Enable Macros after message box closes

Is there a way to enable Macros after the message bar with the Enable Macros button has closed?

I opened the Excel file and immediately went to edit the VBA. When I went to run the VBA, it stated,

The macros in this project are disabled. ...

and

Because of your security settings, macros have been disabled. To run macros, you need to re-open this workbook, and then choose to enable macros. ...

To get the Macro to run, I had to close the file and reopen the file to get the message bar and click the button to enable macros. While that procedure is not terribly painful, it is inconvenient.

I could allow ALL macros to run, but I would prefer to keep some security against malicious code.

Is there a way to get the message bar and/or Enable Macros button to reappear without reopening the file?

2

1 Answer

If you trust the workbook running macros.

  1. Go to the Developer tab

  2. Click Macro SecurityScreenshot for steps 1 and 2

  3. Change it to enable all macrosScreenshot steps 5 and 6

As far as I can tell, there is not way to make the "Enable Macros" button reappear.

We run macros frequently at work and do not open unknown files. So this works well and bypasses the "Enable Macros" message bar completely.

When you're done, you can always set it back to "not allow macros with notification".

This will solve your issue of having to reopen your file at least.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like