Excel Macros

  • Thread starter Thread starter Joe J
  • Start date Start date
J

Joe J

Is there a keystroke combination that will disable further
macros from running on a loaded spreadsheet? If, fo
example, I allowed macros to execute when the spreadhseet
originally loaded, how do I disable this function while
inside the same spreadsheet?
 
Hi Joe

One way

If you add this line in each macro/event then the macro will not work when cell A1 have the value "stop"
you can run a macro with this line to place the word "stop" in the cell
Sheets("Sheet1").Range("A1").Value = "stop"

Sub test()
If Sheets("Sheet1").Range("A1").Value = "stop" Then Exit Sub
'''
'''
'Your code
End Sub
 
Back
Top