Force Delete a Sheet

  • Thread starter Thread starter Michael Kintner
  • Start date Start date
M

Michael Kintner

How can I force Delete a Sheet without having a popup dialog?

I am currently doing this (ActiveWindow.SelectedSheets.Delete)

Is there anyother way?

Thank you in advance for your help...

Mike
 
Michael,

Use something like

Application.DisplayAlerts = False
' delete the sheet
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Sub test()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Use Application.DisplayAlerts Michael
 
Mike, try this

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

End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Hi Michael,

To supress the messagebox(es), you can use the DisplayAlerts property:

Application.DisplayAlerts=False
'/ delete sheet here
Application.DisplayAlerts=True

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
Back
Top