ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Slowing Down a Macro (https://www.excelbanter.com/excel-programming/363047-re-slowing-down-macro.html)

Jim Thomlinson

Slowing Down a Macro
 
You have to insert wait times. Here is a quick (or rather slow) example...
Run the test sub...

Public Sub Pause(ByVal WaitTime As Integer)
Application.Wait Now + TimeSerial(0, 0, WaitTime)
End Sub

Sub test()
MsgBox 1
Pause 2
MsgBox 2
Pause 4
MsgBox 3
End Sub

--
HTH...

Jim Thomlinson


"tedd13" wrote:

Hello,

I am wondering if it is possible to slow the speed down on how fast a macro
runs. For example, if you bring up the VB Editor and press the F8 key the
macro will run as long as you hold down the key (or you can just press the
key over and over). Doing this lets you see what is going on as the macro
runs.
However, if you press the play button the macro will run...very fast. It
runs so fast that you can't see what's going on.
So is there a way to slow down how fast it runs? In some cases I would like
the users to be able to see what the macro is doing.

Thanks



All times are GMT +1. The time now is 07:21 AM.

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