Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Stopping an animation macro

I have an animation macro that loops for a while. How
would I be able to have the user press a key and
gracefully stop the macro from running?

Thanks in advance

Ray
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Stopping an animation macro

Hi Ray

Post your code

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ray Kanner" wrote in message ...
I have an animation macro that loops for a while. How
would I be able to have the user press a key and
gracefully stop the macro from running?

Thanks in advance

Ray



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Stopping an animation macro

Here is the code

Private Sub Animate_Click()

Dim n As Integer, i As Integer, Response As Integer
Dim SWWidth As Variant

Application.ScreenUpdating = True

SWWidth = Range("ScrollWindow").Value
If SWWidth = 0 Or Not IsNumeric(SWWidth) Then
Beep
Range("ScrollWindow").Select
MsgBox "Scroll Window must be numeric greater than
0"
Exit Sub
End If

n = Range("AnimateLoop").Value
For i = 1 To n
Call spinWindow_SpinUp
Application.Wait (Now + TimeSerial(0, 0, Range
("WaitTime").Value))
Next i

End Sub
-----Original Message-----
Hi Ray

Post your code

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ray Kanner" wrote in message

...
I have an animation macro that loops for a while. How
would I be able to have the user press a key and
gracefully stop the macro from running?

Thanks in advance

Ray



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Stopping an animation macro

Sorry the last post was incomplete. SpinWindow is a spin
control that changes the dates on a chart so that the
animation macro loops through a chart n times using
different time periods.

Thanks

Ray Kanner


Private Sub Animate_Click()

Dim n As Integer, i As Integer, Response As Integer
Dim SWWidth As Variant

Application.ScreenUpdating = True

SWWidth = Range("ScrollWindow").Value
If SWWidth = 0 Or Not IsNumeric(SWWidth) Then
Beep
Range("ScrollWindow").Select
MsgBox "Scroll Window must be numeric greater than
0"
Exit Sub
End If

n = Range("AnimateLoop").Value
For i = 1 To n
Call spinWindow_SpinUp
Application.Wait (Now + TimeSerial(0, 0, Range
("WaitTime").Value))
Next i

End Sub


-----Original Message-----
Hi Ray

Post your code

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ray Kanner" wrote in message

...
I have an animation macro that loops for a while. How
would I be able to have the user press a key and
gracefully stop the macro from running?

Thanks in advance

Ray



.

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
Protect macro from stopping saman110 via OfficeKB.com Excel Discussion (Misc queries) 1 August 16th 07 08:22 PM
Animation Weave New Users to Excel 1 December 7th 05 02:21 PM
Stopping Excel macro pattern recgonition mal1920 New Users to Excel 2 November 17th 05 05:10 AM
My Macro keeps stopping?? Sh0t2bts Excel Programming 5 October 28th 03 03:08 PM
Stopping a macro without using Ctrl Break Julian[_2_] Excel Programming 1 October 27th 03 02:39 AM


All times are GMT +1. The time now is 04:08 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"