Sub Wait(waitTime As Long)
start = Timer
While Timer < start + waitTime
DoEvents
Wend
End Sub
In
this pro cedure, instead of setting the
waitTime
to five, we call
Wait
with
however long we want to wait (e.g.,
Wait (60)
would wait sixty seconds).
Timed func tions are useful if you want to give
your users a chance to do
something be fore moving on. For example, you might display a text box, wait a
short time, then display a second text box. This allows the
user to focus on the
first text box be fore getting too much in formation. Be careful with timed func-
tions, be cause dif ferent people read at dif ferent speeds. If you set your wait times
too long, some people will get restless waiting for the next thing to hap pen. If
you
set them too short, some peo ple will not have time to finish the first thing.
Some tim ing can be done automatically without VBA. You can use Custom
Animation to have things ap pear and disappear as much as you like. How ever, as
with many things that you can do without VBA, you
might find that you can do
more with VBA. For ex ample, you might ask the user how fast to go:
Do'stlaringiz bilan baham: