How do I make excel not prompt before deleting worksheets?

L

Lar Chen

I am trying to delete worksheets in an excel workbook without it prompting me
if i'm sure everytime i do this. Any ideas?
 
N

Nick Hodge

If you are talking about manually, there is no way around it and believe me,
one day you will be happy it does.

If this is part of a macro, use

Application.DisplayAlerts = False

before you delete the sheet and the =True after

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
[email protected]
 
G

Gord Dibben

Lar Chen

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

Only way to get the sheet back is to close without saving, so be careful.


Gord Dibben MS Excel MVP

On Wed, 12 Jul 2006 14:00:02 -0700, Lar Chen <Lar
 
Top