Deleting sheets

  • Thread starter Thread starter Gary Adamson
  • Start date Start date
G

Gary Adamson

When I try to run a macro to delete sheets in my workbook
I get an error saying "Can't enter break mode at this
time". How can I disable or keep this from ocurring?

ie:

Sub test()
Sheets(Sheets.Count).Delete
End Sub
 
Your code works fine here -assuming that the "Are you sure?" message is a sensible
response.
 
Back
Top