berlinhammer
Board Regular
- Joined
- Jan 30, 2009
- Messages
- 187
Hello
I am trying to write a program and step through but am encountering an irritating problem. I need to delete a sheet but the warning keep forcing me out of break mode. Disabling the Application.DisplayAlerts does not seem to be working.
I won't get the error when I run the code but as I am currently in construction and do not want to run the full code yet, I just want to step through one step at at time and this sheet deleting is preventing me doing so, which is proving a bit of a pain.
Can I do this the way I would like?
Thanks
Jon
I am trying to write a program and step through but am encountering an irritating problem. I need to delete a sheet but the warning keep forcing me out of break mode. Disabling the Application.DisplayAlerts does not seem to be working.
I won't get the error when I run the code but as I am currently in construction and do not want to run the full code yet, I just want to step through one step at at time and this sheet deleting is preventing me doing so, which is proving a bit of a pain.
Can I do this the way I would like?
Thanks
Jon
Code:
Sub example()
Application.DisplayAlerts = False
ThisWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True
End Sub