Solved

Countdown timer in vb login script

Posted on 2006-06-14
2
295 Views
Last Modified: 2012-08-13
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
Comment
Question by:Kevin Smith
2 Comments
 
LVL 13

Accepted Solution

by:
rettiseert earned 250 total points
ID: 16906804
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
 

Author Comment

by:Kevin Smith
ID: 16906969
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question