question about deleting a sheet without any warning

D

Dat Tieu

Hi,

How do I delete a sheet without any delete warning prompt? Or is there any
better way to delete a sheet? Thanks

VBA code: Sheets("Sheet1").Delete
 
G

Gord Dibben

Dat

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Gord Dibben Excel MVP
 

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