Stopping a Macro, Temporaily

krn6264

New Member
Joined
Apr 22, 2003
Messages
13
I have a macro running automatically with the following code

Application.OnTime Now + TimeValue("00:05:00"), "Report"

How do I :oops: pause this so I can make updates on other areas of the spreadsheet without it running.

:confused:
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You could open the VBE and add a breakpoint right in the beginning of the macro and then delete the breakpoint after you make your changes.
 
Upvote 0
Thanks for the info, but could I create a macro to halt the ontime event and assign to a button on the spreadsheet???

:confused:
 
Upvote 0
Thanks for the info, but could I create a macro to halt the ontime event and assign to a button on the spreadsheet???

:confused:
 
Upvote 0
A button is assigned the macro StartTimer

Code:
Public Timestart As Boolean

Sub Doit()
    If Timestart Then
        Application.OnTime Now + TimeValue("00:00:05"), "Report"
    End If
End Sub

Sub Report()
    MsgBox ("Here is the report")
    Doit
End Sub

Sub StartTimer()
    Timestart = Not Timestart
End Sub

HTH you to develop your solution. :)
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,322
Members
451,696
Latest member
Senthil Murugan

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