Sheet Delay

S

shasta

is it actually possible to delay a sheet using a macro?

i'm doin AVCE ICT using Excel 2000... when i record a macro to show
sheet it doesn't delay it....can i do this
 
D

Dave Peterson

Are you looking for Application.wait?



shasta < said:
is it actually possible to delay a sheet using a macro?

i'm doin AVCE ICT using Excel 2000... when i record a macro to show a
sheet it doesn't delay it....can i do this?
 
D

Dave Peterson

When you looked at VBA's help, you should have seen the syntax:

Here's another example:

Option Explicit
Sub testme()

Application.Wait Now + TimeSerial(0, 0, 5)
Worksheets("sheet1").Activate

End Sub

It'll wait 5 seconds, then activate sheet1.
 
S

shasta

wohoo thank you so much....lol...i've spent a month trying to work i
out and my deadline was comin up.....thank you!!!!!!!;
 
R

Robert McCurdy

This delays the sheet selection by 5 seconds.
Check out the Help for more info on OnTime.
Hi Shasta.
Have a look at these two.

Sub DelaySh()
'Run this, and in 5 seconds ShowSheet is run
Application.OnTime Now + TimeValue("00:00:05"), "ShowSheet"
End Sub

Sub ShowSheet()
'U can still use XL instead of waiting
Worksheets("Sheet3").Select
End Sub


Regards Robert
 
Top