Thanks guys, but neither of these approaches will work. Stopping & resetting the interval is
a no go, and a sub or proceedure that blocks button clicks isn't an option.
Thanks guys, but neither of these approaches will work. Stopping & resetting the interval is
a no go, and a sub or proceedure that blocks button clicks isn't an option.
Hi Bruce,
Try disabling the Timer then set the interval to 0 and then set it back to whatever interval you want before enabling it again.
From this page on MSDN:
So if you first set the interval to 0 and then reset it to whatever it should do what you want, right?The Timer control's Enabled property determines whether the control responds to the passage of time. Set Enabled to False to turn a Timer control off, and to True to turn it on. When a Timer control is enabled, its countdown always starts from the value of its Interval property setting
/Henrik.
This method seems to work for me. Here's a quick test I used to verify. Set timer1 interval to 3000
Good call Henrik!Code:Private Sub Command1_Click() Timer1.Enabled = True End Sub Private Sub Command2_Click() Label1.Caption = "" End Sub Private Sub Command3_Click() Timer1.Enabled = False Timer1.Interval = 0 Timer1.Interval = 3000 End Sub Private Sub Timer1_Timer() Label1.Caption = "DONE" End Sub
Wisdom is knowing what path to take next... Integrity is taking it.
Ryan Miller
Woohoo...;o}
Thanks guys. That did the trick.
Private Sub Command1_Click() Timer1.Enabled = True End Sub Private Sub Command2_Click() Label1.Caption = "" End Sub Private Sub Command3_Click() Timer1.Enabled = False Timer1.Interval = 0 Timer1.Interval = 3000 End Sub Private Sub Timer1_Timer() Label1.Caption = "DONE" End Sub
Good call Henrik!
please pals were do i insert this code. is it the timer or the button use in starting the timre or the progress bar please help
Bookmarks