Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting an Excel Worksheet 1

Status
Not open for further replies.

dace

Programmer
Jul 21, 2001
263
US
Hi-

Is there a way to delete/remove an Excel worksheet without popping up the "are you sure you want to do this" dialog?

Thanks!
 
Try adding

Application.DisplayAlerts = False

Before the line that is actually deleting the sheet and set it back after.

Application.DisplayAlerts = False
Sheets(1).Delete
Application.DisplayAlerts = True
 

Application.DisplayAlerts = False

Worksheets("Blad2").Delete

Application.DisplayAlerts = True

Best regards,

Ilse
 
Thanks, that's exactly what I needed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top