deleting sheets

  • Thread starter Thread starter david
  • Start date Start date
D

david

When I delete a sheet in a workbook with a macro it always
has a pop-up that asks if I really want to delete that
sheet. How do I get the macro to tell it yes for me?

Thanks,
David
 
Add this before the statement that deletes

application.displayalerts = false

then before your macro quits

application.displayalerts = True
 
David

Sub delete()
Application.DisplayAlerts = False

''do the deleting

Application.DisplayAlerts = True

End Sub

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 
Back
Top