Hi Tom,
just one possible way, using the caption, though.
---
Public Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Sub Makro1()
UserForm1.Show
End Sub
---
Private Sub UserForm_Activate()
Dim i As Integer
Me.Repaint
For i = 10 To 1 Step -1
Me.Caption = Str(i)
Sleep 1000
Next
End Sub
You may want to disable some or all controls on the form
in addition beforehand. Otherwise, if the user has clicked
on some commandbutton during the countdown,
the command would be executed after waiting.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Microsoft - 07 Nov 2004 05:18 GMT
Helmut,
Thanks for the reply. I'll give your suggestion a try. And good point
on disabling the other form controls too--I had not thought about that,
but it makes perfect sense.
After getting home last night, I was racking my brain over this question
and I came up with the name of the Timer function. I looked that up in
the VBA Help, and it looks like that is the command that I was looking
for. Also, when I looked up the Timer function, one of the related
commands that came up was the OnTime method, which might also be of some
use in solving problems like this one.
--Tom
> Hi Tom,
> just one possible way, using the caption, though.
[quoted text clipped - 23 lines]
> Word XP, Win 98
> http://word.mvps.org/