Sub doTest1() Dim intCounter As Integer Dim intTest As Integer intTest = 1 intCounter = 1 Do Until intTest <> 1 Debug.Print "This is loop number " & intCounter If intCounter >= 5 Then intTest = 0 End If intCounter = intCounter + 1 Loop End Sub