Data may exist in the sheet(s) selected for deletion

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Data may exist in the sheet(s) selected for deletion

  1. #1
    New Member
    Join Date
    May 2005
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Data may exist in the sheet(s) selected for deletion

     
    All right, this is a very simple macro.

    Sheets("Sheet3").Select
    ActiveWindow.SelectedSheets.Delete

    However, right after I run this macro, a prompt appears:

    "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete."

    Is there a way to remove this dialog box by adding an automatic reply for this prompt?

    I am 100% sure that it is perfectly safe to delete it.

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Tasmania
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Yes (This prevents the dialog box from appearing)
    Code:
    Application.DisplayAlerts = False
    Sheets("Sheet3").Select
    ActiveWindow.SelectedSheets.Delete
    Application.DisplayAlerts = True
    Fred

  3. #3
    New Member
    Join Date
    May 2005
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi

    Yes (This prevents the dialog box from appearing)
    Code:
    Application.DisplayAlerts = False
    Sheets("Sheet3").Select
    ActiveWindow.SelectedSheets.Delete
    Application.DisplayAlerts = True
    Fred
    You're a natural genius! Thank you very, very much!

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com