exit do until loop vba code example
Example 1: vba do until
Sub ExitExample()
counter = 0
myNum = 9
Do Until myNum = 10
myNum = myNum - 1
counter = counter + 1
If myNum < 10 Then Exit Do
Loop
MsgBox "The loop made " & counter & " repetitions."
End Sub
Example 2: do until loop vba
Not IsEmpty(Cells(i, 1)) OR Not IsEmpty(Cells(i, 2))