• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • 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!"
0
Kevin Smith
Asked:
Kevin Smith
1 Solution
 
rettiseertCommented:
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
0
 
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!
Kevin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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