determining macro status in a cell

  • Thread starter Thread starter newengland
  • Start date Start date
N

newengland

Hi

Is there a way to determine the status of macros (enabled or disabled
within a cell formula?


Thank
 
Is this your workbook that contains the macros?

If yes, then maybe you could have a dummy userdefined function:

Option Explicit
Function macrosEnabled() As Boolean
Application.Volatile
macrosEnabled = True
End Function

If macros are disabled, you'd get a #name? error. If macros are enabled, you
wouldn't get an error.

=IF(ISERROR(macrosenabled()),"Disabled","enabled")

But you will have to go through one calculation. (If the user has manual
calculation, then this could give a wrong answer--until the first calculation.)
 
Back
Top