how can i correct this code to run 12 times
The timer is only called in the first run and never gets called again.
The timer is only called in the first run and never gets called again.
Code:
Option Explicit
Dim mlAmount As Long
Dim iCnt As Long
Dim miCounter As Integer
Sub Start()
Dim i As Integer
For i = 1 To 12
iCnt = 1
mlAmount = 10
DoEvents
Timer1.Interval = 60
Timer1.Enabled = True
Next
End Sub
Private Sub Timer1_Timer()
If iCnt <= mlAmount Then
lblWinThisRun.Caption = iCnt
lblCredit = Val(lblCredit) + 1
iCnt = iCnt + 1
Else
iCnt = 1
Timer1.Enabled = False
mWinInProgress = False
miCounter = miCounter + 1
Debug.Print miCounter
End If
End Sub