Consulting

Results 1 to 2 of 2

Thread: Countdown Clock

  1. #1

    Countdown Clock

    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

  2. #2
    Hi

    Did you think of something like this?

    [vba]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
    [/vba]

    Jimmy
    -------------------------------------------------
    The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •