disable warnings

L

larry

I want to be able to delete a worksheet without getting
the built-in warning message every time on Excel 2000 SP2.
Is ther a way to do this? Thanks
 
D

Dave Peterson

application.displayalerts = false
worksheets("sheet1").delete
application.displayalerts = true
 
G

Gord Dibben

Larry

Using VBA code.

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

If unsure of where to place this code and how to use it, visit David
McRitchie's website for info on getting started with VBA and macros.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

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