Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Is it possible to disable a macro and prevent it from running with a command
from another macro? -- Andy T |
#2
![]() |
|||
|
|||
![]()
One way to do that is with a flag variable:
Dim DisableFlag As Boolean Sub DisableTheMacro() DisableFlag = True End Sub Sub EnableTheMacro() DisableFlag = False End Sub Sub TheMacro() If Not DisableFlag Then MsgBox "The Macro has Run!" End If End Sub -- Jim Rech Excel MVP "Andy T" wrote in message ... | Is it possible to disable a macro and prevent it from running with a command | from another macro? | -- | Andy T |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable menu selection | Excel Discussion (Misc queries) | |||
excel macro inconsistency | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro help | Excel Discussion (Misc queries) | |||
macro interruption: help!!! | Excel Discussion (Misc queries) |