Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all,
I have write VBA Code to close a workbook when it was open. Now when I open the workbook, the workbook will close immediately, thus I cannot edit the VBA Code. How can stop the VBA code from executing and then I can edit the VBA code. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try holding down the Shift key when you open the workbook.
"hon123456" wrote: Dear all, I have write VBA Code to close a workbook when it was open. Now when I open the workbook, the workbook will close immediately, thus I cannot edit the VBA Code. How can stop the VBA code from executing and then I can edit the VBA code. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
JMB, You can also press ctrl/break(Pause) to stop the code.
Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My impression is it was an autoopen macro. Depending on how long it takes
the macro to run, I think there may not be enough time. Personally, I keep a button on my toolbar to toggle events on/off Sub ToggleEvents() With Application .EnableEvents = Not .EnableEvents If .EnableEvents Then .StatusBar = False Else: .StatusBar = "Events Are Disabled" End If End With End Sub But the OP could also set security to medium or high prior to opening the workbook. "Les Stout" wrote: JMB, You can also press ctrl/break(Pause) to stop the code. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have had this problem as well recently and I solved it by doing
this... debug.assert 1 = 2 Adding this as the first line in your Auto_Open and it will break on its own each time its run. Hope that helps. theSquirrel JMB wrote: My impression is it was an autoopen macro. Depending on how long it takes the macro to run, I think there may not be enough time. Personally, I keep a button on my toolbar to toggle events on/off Sub ToggleEvents() With Application .EnableEvents = Not .EnableEvents If .EnableEvents Then .StatusBar = False Else: .StatusBar = "Events Are Disabled" End If End With End Sub But the OP could also set security to medium or high prior to opening the workbook. "Les Stout" wrote: JMB, You can also press ctrl/break(Pause) to stop the code. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select disable macros on opening Excel.
If this does not appear open Excel and set security to medium, then close Excel and open your problem workbook, then select disable macros. -- Cheers Nigel "hon123456" wrote in message ups.com... Dear all, I have write VBA Code to close a workbook when it was open. Now when I open the workbook, the workbook will close immediately, thus I cannot edit the VBA Code. How can stop the VBA code from executing and then I can edit the VBA code. Thanks. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Keep the shift button pressed when you open your workbook.
Regards, Steve Nigel schrieb: Select disable macros on opening Excel. If this does not appear open Excel and set security to medium, then close Excel and open your problem workbook, then select disable macros. -- Cheers Nigel "hon123456" wrote in message ups.com... Dear all, I have write VBA Code to close a workbook when it was open. Now when I open the workbook, the workbook will close immediately, thus I cannot edit the VBA Code. How can stop the VBA code from executing and then I can edit the VBA code. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I stop a formula from executing based on a cell value? | New Users to Excel | |||
Excel Macro Stop Executing | Excel Programming | |||
executing an add in | Excel Programming | |||
How do I stop other circles in other cells to stop selecting? | Excel Worksheet Functions | |||
How do I stop other circles in other boxes to stop selecting? | Excel Worksheet Functions |