Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Answering macro (Excel 2002)

    I run a text-to columns macro. At the end of it, there is the question about overwriting existing files. I can't determine how to answer that question "Yes" in code. I don't see an argument in the parameters box. I have this issue elsewhere, too . TYIA

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Answering macro (Excel 2002)

    Incluse

    Application.DisplayAlerts = False

    before the code that prompts for the input.

    Set things back to normal with

    Application.DisplayAlerts = True

    once you are finished.

    Andrew C

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Answering macro (Excel 2002)

    Thanks. So Display alerts defaults to the "OK" answer!

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Answering macro (Excel 2002)

    It proceeds with the requested action without requiring confirmation.

    Andrew C

  5. #5
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Answering macro (Excel 2002)

    Andrew
    True for this case where the default action is "OK".
    The general case is that it takes the "default" action for the alert.
    At times the default action for an alert may be 'Cancel' or its equivalent. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  6. #6
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Answering macro (Excel 2002)

    Like anything, it takes the default action - unless it is instructed to take something else.
    Gre

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •