ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheet Delay (https://www.excelbanter.com/excel-programming/294462-sheet-delay.html)

shasta[_2_]

Sheet Delay
 
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

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Sheet Delay
 
Are you looking for Application.wait?



"shasta <" wrote:

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?

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


shasta[_3_]

Sheet Delay
 
i tried that but msg box popped up saying Argument no
Optional...:confused

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Sheet Delay
 
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.




"shasta <" wrote:

i tried that but msg box popped up saying Argument not
Optional...:confused:

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


shasta[_4_]

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

--
Message posted from http://www.ExcelForum.com


Robert McCurdy

Sheet Delay
 
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

"shasta " wrote in message ...
i tried that but msg box popped up saying Argument not
Optional...:confused:


---
Message posted from http://www.ExcelForum.com/



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.655 / Virus Database: 420 - Release Date: 09/04/2004




All times are GMT +1. The time now is 04:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com