View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Slow Down the Macro to View

check vba help for the wait method. perhaps put the code in a separate
subroutine and call it whenever you want it to slow down. For example, the
following test should activate each worksheet in the book with a 5 second
pause in between.


Sub test()
Dim wksTemp As Worksheet

For Each wksTemp In Sheets
wksTemp.Activate
Call TimeOut(0, 0, 5)
Next wksTemp
End Sub

Sub TimeOut(lngHour As Long, _
lngMinute As Long, _
lngSecond As Long)
Dim dblWaitTime As Double

dblWaitTime = Now() + TimeSerial(lngHour, _
lngMinute, lngSecond)

Application.Wait dblWaitTime

End Sub

"Aria" wrote:

Hello,
Once a macro is triggered, it's incredibly fast. That's great and all.
However, what if I want the code to move slow enough so the other users
could see what it's doing every time ie. Cut and Paste (without Stepping
into the code and F8 through it all).

If it's possible, how would you do it?

Thanks,
Aria :)

*** Sent via Developersdex http://www.developersdex.com ***