"The macro may not be available in this workbook or all macros may be disabled"

Jensen 3:16

Board Regular
Joined
Jul 4, 2004
Messages
50
I get this message on a workshet I am doing in Excel 2007 that contains 1 VBA Code. I checked my macro settings and the "disable all macros with notification is checked". As a novice excel user, I am hesitant about the "Enable All Macros" because it says "not recommended, dangerous code can run". Can someone please explain what might happen if I do check that option?
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,886
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
It's a bit of a vague question as it depends what someone has written in the code. As a very simple example you could have something like
Code:
For Each ws In ActiveWorkbook.Worksheets
        ws.Cells.ClearContents
    Next ws
which would empty all your cells in your workbook.

Unlike with a formula there isn't an undo action (unless you are using something like an autofilter).

But if you want to use macros then you have to have them enabled.

All the message is saying is check to make sure you know what you are running (or you trust the person who wrote it).

The enable all macros option do not use under any cicumstances
 
Last edited:

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,886
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
I wasn't quite clear in the previous post.
But if you want to use macros then you have to have them enabled.
All the message is saying is check to make sure you know what you are running (or you trust the person who wrote it).
refers to the message you get with "disable all macros with notification is checked" which you should stick to.

I stress
The enable all macros option do not use under any cicumstances
 

Watch MrExcel Video

Forum statistics

Threads
1,123,259
Messages
5,600,574
Members
414,390
Latest member
plimbu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top