View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to Stop VBA from executing

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