trying to learn VB6. Simple counting loop which counts to 8 in 1 sec
intervals, then starts from 1 again and repeats.
Have two Command buttons on the form. Cmd1 starts the counting, and I need
to know how to stop it with Cmd2. Here's my code so far:
Private Sub Command1_Click( )
Dim x, y, m
m = 1
Do
Print m
x = Timer
Do Until Timer = x + 1
y = Timer
Loop
m = m + 1
If m > 8 Then
m = 1
End If
Loop
End Sub
intervals, then starts from 1 again and repeats.
Have two Command buttons on the form. Cmd1 starts the counting, and I need
to know how to stop it with Cmd2. Here's my code so far:
Private Sub Command1_Click( )
Dim x, y, m
m = 1
Do
Print m
x = Timer
Do Until Timer = x + 1
y = Timer
Loop
m = m + 1
If m > 8 Then
m = 1
End If
Loop
End Sub
Comment