upobDaPlaya
asked on
Go to the next record
In the below I want to go to the next worksheet if the condition is not met..The only way I could figure this out was by doing GOTO..What is a suggestion
For each ws in this workbook
If ws.Range ("A2") Like "2013" Then
GOTO Next
else
code line
code line
code line
code line
NEXT:
Next ws
code line
code line
code line
code line
End Sub
For each ws in this workbook
If ws.Range ("A2") Like "2013" Then
GOTO Next
else
code line
code line
code line
code line
NEXT:
Next ws
code line
code line
code line
code line
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's why it says: if <b>not</b> ... Like
So the code I've put does this
For each worksheet in workbook
If not condition then
Do stuff
End if
Next worksheet
Do more stuff at the end
For each worksheet in workbook
If not condition then
Do stuff
End if
Next worksheet
Do more stuff at the end
ASKER
Got it...did not see the NOT :) thx
ASKER