Hi,
I'm trying to make a program do X every 30 seconds. My timer only fires once. Here's my code:
(in Declarations)
(in Form Load)Code:Option Explicit Dim Counter As Integer
And my sub:Code:Timer1.Enabled = True Timer1.Interval = 1000 Counter = "0"
I've tried changing things around a bit, and I've tried putting Timer1.Enabled=False followed by Timer1.Enabled=True after the MsgBox.Code:Private Sub Timer1_Timer() Counter = Counter + 1 If Counter = 30 Then MsgBox "30 seconds has passed" End If End Sub
What's wrong?
Thanks.




Reply With Quote