Any code snippets that count down from current date till the end of the month?
How to setup a count down timer?
Started by MSIE, Jan 25 2011 03:35 PM
3 replies to this topic
#1
Posted 25 January 2011 - 03:35 PM
|
|
|
#2
Posted 26 January 2011 - 01:24 PM
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#3
Posted 27 January 2011 - 08:19 PM
I think this code will help you.
Dim elapsed As Long, temptime As Long
Private Sub Command1_Click()
Timer1.Enabled = True
temptime =Hour(now()* 3600+ Minute(Now() * 60 + Second(Now())) + 30 ' this is for 30 seconds. change this to your need
Label1 = temptime
End Sub
Private Sub Timer1_Timer()
elapsed = Hour(now()*3600 +Minute(Now() * 60 + Second(Now()))
Label2 = elapsed
Label3 = (temptime - elapsed) & "Seconds"
If elapsed = temptime Then
MsgBox ("over")
Timer1.Enabled = False
End If
End Sub
Edited by Roger, 28 January 2011 - 11:02 PM.
removed links, added code block
#4
Posted 03 February 2011 - 08:18 AM
johnpitter said:
I think this code will help you.
Dim elapsed As Long, temptime As Long
Private Sub Command1_Click()
Timer1.Enabled = True
temptime =Hour(now()* 3600+ Minute(Now() * 60 + Second(Now())) + 30 ' this is for 30 seconds. change this to your need
Label1 = temptime
End Sub
Private Sub Timer1_Timer()
elapsed = Hour(now()*3600 +Minute(Now() * 60 + Second(Now()))
Label2 = elapsed
Label3 = (temptime - elapsed) & "Seconds"
If elapsed = temptime Then
MsgBox ("over")
Timer1.Enabled = False
End If
End Subcan you please give the full code of this? and also the button,label needed here thank you


Sign In
Create Account

Back to top









