Is there a way to have a countdown timer in VBA and show it in the userform?
We have a stock market game that we're creating using VBA (Excel) and we need to have a countdown timer. The purpose of the timer is to limit the amount of time the player can participate in the stock trading. When the time is up, no further changes can be made and whatever the action done before the time is up is final. The timer should run from a minute up to 2 minutes, depending on the level. The time remaining should also be seen in the userform, particularly in a label.
Public Comments
- try looking up the following command: Application. Ontime Now + TimeValue("00:00:00"), <procedure name as string> there are other arguments to this command. i suggest you look it up. :) a sample syntax would be like this: Application.OnTime Now + TimeValue("00:00:30"), "timer_countdown" The syntax above tells the program to run another sub procedure, timer_countdown written as a string, after 30 seconds has elapsed.
Powered by Yahoo! Answers