I have a continues loop That I am stopping using the Do While command.
The only problem is it quits my whole program. What do I need to change so that when I hit the Stop button (Command button on form) It stops the loop.
The Command button is labeled StopCmd_Click()
The code for the Loop is:-
Private Sub Timer1_Timer()
Static Temp As Integer
Temp = Temp + 1
Do While DoEvents()
If Temp Mod 2 = 0 Then Exit Do
Loop
Thanks for any help
Gary
The only problem is it quits my whole program. What do I need to change so that when I hit the Stop button (Command button on form) It stops the loop.
The Command button is labeled StopCmd_Click()
The code for the Loop is:-
Private Sub Timer1_Timer()
Static Temp As Integer
Temp = Temp + 1
Do While DoEvents()
If Temp Mod 2 = 0 Then Exit Do
Loop
Thanks for any help
Gary