Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code which tests for a condition and deletes unwanted rows:
For i = 2 To intLastRow strCellText = ActiveCell.Text intLocInStr = InStr(1, strCellText, "sample text", vbTextCompare) If intLocInStr 0 Then ActiveCell.Offset(1, 0).Select Else ActiveCell.EntireRow.Delete intLocInStr = 0 End If strCellText = "" Next i Sometimes, after the ActiveCell.EntireRow.Delete line, the code breaks as if I had pressed ctrl-Break. I get the message "Code execution has been interrupted" with options to End, Debug, etc. I don't have breakpoints or anything. Has anyone ever had this problem or know why my code keeps breaking? (It's pretty annoying to have to sit there and keep pressing C ... for Continue.) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
Break a link between workbooks when there is no "break" option | Excel Discussion (Misc queries) | |||
Break cell into multiple lines by line break | Excel Discussion (Misc queries) | |||
code break message box | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) |