vba exit while
Do While True
count = count + 1
If count = 10 Then
Exit Do
End If
Loop
4.1
10
'VBA does NOT have an Exit statement for While Wend loops. While Wend
'loops must run through completion:
While i < 1000
c = c + 1
Wend
'...or be interrupted by a GoTo statement:
While i < 1000
c = c + 1
If c = 750 Then GoTo MyExit
Wend
MyExit:
'But using a GoTo statement is usually bad coding practice.
Thank you!
10
0
Are there any code examples left?
New code examples in category VBA