Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Contents of Timer Control in Label

Status
Not open for further replies.

jeak

Technical User
Oct 9, 2002
16
US
Hi!

I am trying to show the contents of one of my timer controls in a label. For example, I would like to set the timer interval at 15 seconds and have it count down to zero. How would I show this in the label? Please let me know if you have any suggestions.

Thanks!
 

Oh, something like...
[tt]
Dim CountDown As Interer

Private Sub Form_Load()
CountDown = 15
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub

Private Sub Timer1_Timer()
Label1.Caption = CountDown
CountDown = CountDown -1
If CountDown = 0 Then Timer1.Enabled = False
End Sub
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top