• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Countdown timer in vb login script

How do I create a countdown timer to a date in a vb login script?  For example, I want a box to pop up at login to say "Only 21 days left until Big Day!"
Kevin Smith
Kevin Smith
1 Solution
Something like this?

    Dim BigDay
    Dim DaysRemaining
    BigDay = DateSerial(2006, 6, 30) 'Year, month, day of bigday
    DaysRemaining = DateDiff("d", Date, BigDay)
    MsgBox "Only " + Format(DaysRemaining) + " for the big day!", vbInformation
Kevin SmithAuthor Commented:
Worked great, thanks!  I did have to change the last line to:

MsgBox ("Only " &(DaysRemaining) & " for the big day!"), vbInformation

'cause I got a format error.

Thanks rettiseert!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now