Timer to slow down macro

stam

New Member
Joined
Jul 12, 2011
Messages
11
Hello Mr Excel guru's,

First off, I'm a newbie to this site so please excuse anything that I'm doing wrong. I will learn and pick up the etiquettes. Here's my question: I want to slow down the run time of a macro via a timer. It seems like the macro hasn't completely finished performing its tasks after it is compiled. I'm not sure if it is a speed issue related to my computer or the company's network. All this macro is doing is open then print multiple workbooks, but the macro is running so fast some workbooks are not printed. I am on Excel 2010 in Windows 7. Thanks for any help.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Thank you for the suggestion. I will give it a try. Is a mandatory parameter required? (ie Application.Wait(10). is 10 in seconds?)
 
Upvote 0
Hi Stam
Are you sure the speed of the macro is the problem ?
This example snippet will make the code wait 10 seconds between MsgBoxes.
Code:
Sub test()
MsgBox "1"
Application.Wait (Now + TimeValue("00:00:10"))
MsgBox "test"
End Sub
 
Upvote 0
Hi Michael,

I think your code will work for my situation, thanks for your input. I am now very excited to try it.
 
Upvote 0
Thank you everyone for looking at my question. The Application.Wait did the trick! Never thought I would complain about the computer running too fast.
 
Upvote 0
Glad you got it working....
Do you realise you can use the App.wait multiple times.
Code:
Sub test()
MsgBox "1"
Application.Wait (Now + TimeValue("00:00:10"))
MsgBox "2"
Application.Wait (Now + TimeValue("00:00:10"))
MsgBox "3"
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top