PDA

View Full Version : Countdown Clock



Gordon Scott
03-22-2007, 03:35 AM
HI All

Can anyone help me here. I want to have a countdown Clock To a Certain date in Weeks and Days to go only in an excel worksheet so that when it is opened it automatically changes. Is there a macro or function that can do this ?

Gordon

JimmyTheHand
03-22-2007, 07:10 AM
Hi :hi:

Did you think of something like this?

Private Sub Workbook_Open()
Dim ReferenceDate As Single, Diff As Single
Dim Msg As String

ReferenceDate = CSng(CDate("10/12/2007 23:59"))
Diff = ReferenceDate - Now

Msg = Int(Diff) & " days and " & Round((Diff - Int(Diff)) * 24) & " hours left."
ThisWorkbook.Sheets(1).Range("A1").Value = Msg
End Sub


Jimmy