Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I don't like the confirmation dialog...Can I kill (Excel 2002)

    I am trying to run the following an a macro in Excel and it pops up a dilog asking for confirmation.
    <pre>Sheets("Written Instructions").Delete</pre>


    Can I turn off the dialogs in Excel similar to DoCmd.SetWarnings False in Access?
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  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: I don't like the confirmation dialog...Can I kill (Excel 2002)

    Use

    Application.DisplayAlerts = False
    Sheets("Written Instructions").Delete
    Application.DisplayAlerts = True

    Andrew C

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: I don't like the confirmation dialog...Can I kill (Excel 2002)

    Application.DisplayAlerts = False

    Remember to reset to True; I think that is default when the routine is exited.
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I don't like the confirmation dialog...Can I kill (Excel 2002)

    Man...

    For the first time ever I think I used the object browser and saw Application.Dialogs but somehow missed .DisplayAlerts

    Thanks for the assistance!!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

Posting Permissions

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