deleting sheets

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
 
R

Robert Black

Add this before the statement that deletes

application.displayalerts = false

then before your macro quits

application.displayalerts = True
 
G

Gord Dibben

David

Sub delete()
Application.DisplayAlerts = False

''do the deleting

Application.DisplayAlerts = True

End Sub

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top