Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a loop which loops through sheets and cells via the SpecialCells
Method. If I come to a sheet which is blank I want the code to exit the loop and proceed onto the next sheet. The error handling below does not do this. What changes do I need to make? For Each sht In ThisWorkbook.Worksheets sht.Activate On Error Resume Next ' Added in event that sheet does not have formulas For Each rng In sht.UsedRange.SpecialCells(xlCellTypeFormulas) If Err.Number < 0 Then Exit For Else rng.Select End If Thanks EM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to exit the loop? | Excel Programming | |||
Loop to Filter, Name Sheets. If Blank, Exit Loop | Excel Programming | |||
exit for loop | Excel Programming | |||
exit for next loop | Excel Programming | |||
exit from a loop? | Excel Programming |