ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Activesheet.delete (https://www.excelbanter.com/excel-programming/300713-activesheet-delete.html)

Ron McCormick[_5_]

Activesheet.delete
 
I have a procedure which at one stage loops through a number of sheets in my workbook deleting them until it comes to a particular sheet, at which point it moves on to the next stage in the procedure. I have a problem at a later stage in the procedure and I want to step through the procedure to find out where the problem is. The trouble I have is that whenever the procedure reaches the sheet deletion stage a message comes up saying 'Can't enter break mode at this time', consequently I am unable to locate where the later problem is

Does anyone know why this happens and is there a work around

TI
Ron

libby

Activesheet.delete
 
You could put a break point in just before the problem
section and then run the code. The code will stop at the
break point and you can step through from there.

Alternatively, replace the deletion temporarily with
something else such as hiding the sheet.


-----Original Message-----
I have a procedure which at one stage loops through a

number of sheets in my workbook deleting them until it
comes to a particular sheet, at which point it moves on to
the next stage in the procedure. I have a problem at a
later stage in the procedure and I want to step through
the procedure to find out where the problem is. The
trouble I have is that whenever the procedure reaches the
sheet deletion stage a message comes up saying 'Can't
enter break mode at this time', consequently I am unable
to locate where the later problem is.

Does anyone know why this happens and is there a work

around?

TIA
Ron
.



All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com