By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Application.Wait

P: 18
VBA for Excel contains the command Application.Wait ("time").

It does not however work in a Word application. Is there a similar command for VBA in Word?

Thanks.

Bertie
May 2 '07 #1
Share this Question
Share on Google+
4 Replies


100+
P: 149
VBA for Excel contains the command Application.Wait ("time").

It does not however work in a Word application. Is there a similar command for VBA in Word?

Thanks.

Bertie

Put this
into your Declarations section in either your module
or form/report source code:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Here's a sample call:

Sleep (5000) ' Waits for 5 seconds


-ansuman sahu
May 2 '07 #2

P: 18
Put this
into your Declarations section in either your module
or form/report source code:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Here's a sample call:

Sleep (5000) ' Waits for 5 seconds


-ansuman sahu

Thanks!

Does this procedure "sleep" the application only, or the system?

B
May 3 '07 #3

Denburt
Expert 100+
P: 1,356
Only the program it is used in:

The Kernel32 contains a function that pauses a program's execution for a specified amount of time, specified in milliseconds. For you to use the function, it must first be declared in the General Declarations section of the module in which it will be used:
More info and other methods you can use

:) I hope that answers your questions.
May 3 '07 #4

P: 18
Only the program it is used in:



More info and other methods you can use

:) I hope that answers your questions.
Yes, it certainly does. Thanks a lot!

B
May 4 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.