Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prompt to Delete Sheet (03)

    What is the VBA code for responding to the following prompt?

    Example of Code:
    Sheets("Sheet3").Delete

    Thanks,
    John
    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompt to Delete Sheet (03)

    If you want to delete the sheet without seeing the prompt:

    Application.DisplayAlerts = False
    Sheets("Sheet3").Delete
    Application.DisplayAlerts = True

    If you set DisplayAlerts to False, VBA will choose the default option in dialog boxes; in this example it will select Delete.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompt to Delete Sheet (03)

    Thank you Hans

    John

Posting Permissions

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