Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Slow Down the Macro to View

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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Slow Down the Macro to View

Hello Aria

This may be rather simplistic but if you place this line of code after
each line you want slowed it will take 2 seconds between each action.

Application.Wait Now + (TimeValue("00:00:02"))

Change to suit.

Take Care

Marcus

On Feb 1, 11:37 am, Aria <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 Developersdexhttp://www.developersdex.com***



  #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 ***

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Slow Down the Macro to View

Thank-you so much JMB and Marcus,
Both are very good choices. I will try both of your suggestions. This
will help my work greatly.

Thanks again,
Aria :)


*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Slow Down the Macro to View

Aria,
Not sure if this is practical, but have you looked at a product like AutoIt,
http://www.autoitscript.com/.
As I remember, you can set the play back speed to the same as the recording.
However, I believe it works on screen coordinates, so if the users have
different resolutions, location of windows etc, you will not get reliable
results.
If this is to used on the same system, then it may work.

OK, not really an Excel/VBA solution, but...

NickHK

<Aria wrote in message ...
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 ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom View show is very slow Spencer Hutton Excel Discussion (Misc queries) 0 September 16th 09 04:37 PM
Macro help, very slow Scott Marcus Excel Programming 0 November 8th 06 05:39 PM
Very slow macro CLR Excel Programming 10 September 21st 05 12:32 PM
Macro slow down Jonny Excel Programming 3 February 24th 05 01:29 AM
Macro it's very Slow .... leo_nunez[_2_] Excel Programming 4 August 28th 04 03:45 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"