Delete sheet automatic

D

David

Hi Group,

I am trying to allow a sheet deletion with out having to manually click the
Delete button which comes up in the process.

Thanks,
David
 
S

smartin

David said:
Hi Group,

I am trying to allow a sheet deletion with out having to manually click the
Delete button which comes up in the process.

Thanks,
David

Try this before the delete:

Application.DisplayAlerts = False
 
G

Gord Dibben

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


Gord Dibben MS Excel MVP
 
Top