Deleting sheets

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
 
H

Harald Staff

Your code works fine here -assuming that the "Are you sure?" message is a sensible
response.
 

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