Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bypassing the Delete Sheet Alert (2000 (9.0.4402 SR-1))

    I'm deleting worksheets from a workbook using VBA code:
    <font face="Georgia">
    Sheets("Sheet1").Delete
    </font face=georgia>
    This generates an alert box asking if I really want to delete the sheet. No big deal, except when I'm trying to delete 30 or 40 sheets I get an alert for each one! I figure there must be a check box to disable this somewhere in the options, but I sure can't find it. Anyone know of a way to bypass these alerts?

    Thanks.

  2. #2
    2 Star Lounger
    Join Date
    May 2002
    Location
    Midland, Michigan, USA
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bypassing the Delete Sheet Alert (2000 (9.0.4402 SR-1))

    Before you issue the delete statements, insert APPLICATION.DISPLAYALERTS = FALSE, and after the deletions, reverse it with APPLICATION.DISPLAYALERTS = TRUE.

    HTH

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bypassing the Delete Sheet Alert (2000 (9.0.4402 SR-1))

    Just what I needed! Thanks!! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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