M
Montana DOJ Help Desk
Word 2000
I am thinking about writing a macro that will display a 10 second count down
in a user form. In order to do that, I would have to update the form once a
second. I took a quick stab at making this work, but I ran into two
problems. 1) I was trying to use the Update method with my user form, and
that was causing a problem, and 2) I could not find the command in the VBA
Help to make my code wait for 1 second between each update. What I tried
initially was similar to the following:
Dim MyDialog as Dialog
Set MyDialog = ufCountDown
For Seconds = 10 to 1 Step - 1
lblCountDown.Caption = "Seconds remaining: " & Seconds
MyDialog.Update
< Command to wait 1 second>
Next
Can someone help me get this working?
-- Tom
State of Montana
Department of Justice Help Desk
"Making the world a safer place."
I am thinking about writing a macro that will display a 10 second count down
in a user form. In order to do that, I would have to update the form once a
second. I took a quick stab at making this work, but I ran into two
problems. 1) I was trying to use the Update method with my user form, and
that was causing a problem, and 2) I could not find the command in the VBA
Help to make my code wait for 1 second between each update. What I tried
initially was similar to the following:
Dim MyDialog as Dialog
Set MyDialog = ufCountDown
For Seconds = 10 to 1 Step - 1
lblCountDown.Caption = "Seconds remaining: " & Seconds
MyDialog.Update
< Command to wait 1 second>
Next
Can someone help me get this working?
-- Tom
State of Montana
Department of Justice Help Desk
"Making the world a safer place."