Macros in Excel 2007

G

Guest

I've looked through all the macro posts and can't solve this. I converted my
..xls file to .xlsm (macro-enabled workbook) but still can't get the macros to
operate.

I get the message 'Because of your security settings, macros have been
disabled. To run macros, you need to reopen this workbook, and then choose to
enable macros.'

I have enabled all macros in the Trust Center and the VB tab shows the macro
code.

Anu suggestions?
 
J

Jim Rech

If you have macro security set to "Disable all macros with notification"
then after you open a workbook with macros you should see a "Security
warning" bar appear above the Formula bar. It has an Options button that
you can use to enable macros.

--
Jim
| I've looked through all the macro posts and can't solve this. I converted
my
| .xls file to .xlsm (macro-enabled workbook) but still can't get the macros
to
| operate.
|
| I get the message 'Because of your security settings, macros have been
| disabled. To run macros, you need to reopen this workbook, and then choose
to
| enable macros.'
|
| I have enabled all macros in the Trust Center and the VB tab shows the
macro
| code.
|
| Anu suggestions?
 
G

Guest

I know the bar you're referring to as it was appearing before I converted to
..xlsm. I have just tried your suggestion and still the same whether I choose
that option or 'Enable all macros' and the bar doesn't appear. Could it be
hidden somewhere?

When I open the macro dialogue box in 'View Macros' they are all listed but
all options other than 'run' and 'step into' are greyed out.

GM
 
J

Jon Peltier

If Run is not grayed out, it means you can run the macros, the macros are
enabled. If the other options are grayed out, the VB project is password
protected, and you are not allowed to view the code. I couldn't get Step
Into to be enabled without the other editing buttons also to be enabled.

- Jon
 
G

Guest

Thanks for your input. I have just got to the bottom of this with technical
support and it appears to be an encryption issue. In .xlsm format if you
password protect your file the macros will not run. So if you want a password
protected file with macros that will run you still have to save as 97-2003
workbook.

It is a software issue they have become aware of and apparently will correct
 
J

Jim Rech

Ah, yes, now I remember this problem. There is a registry key that fixes
this. Under:

HKCU\Software\Microsoft\Office\12.0\Excel\Security

add this new Dword key and set its value to 1.

ExcelBypassEncryptedMacroScan

(Run the RegEdit.exe program to do this.)

--
Jim
| Thanks for your input. I have just got to the bottom of this with
technical
| support and it appears to be an encryption issue. In .xlsm format if you
| password protect your file the macros will not run. So if you want a
password
| protected file with macros that will run you still have to save as 97-2003
| workbook.
|
| It is a software issue they have become aware of and apparently will
correct
| on future updates.
|
| "Jon Peltier" wrote:
|
| > If Run is not grayed out, it means you can run the macros, the macros
are
| > enabled. If the other options are grayed out, the VB project is password
| > protected, and you are not allowed to view the code. I couldn't get Step
| > Into to be enabled without the other editing buttons also to be enabled.
| >
| > - Jon
| > -------
| > Jon Peltier, Microsoft Excel MVP
| > Tutorials and Custom Solutions
| > http://PeltierTech.com
| > _______
| >
| >
| > | > >I know the bar you're referring to as it was appearing before I
converted
| > >to
| > > .xlsm. I have just tried your suggestion and still the same whether I
| > > choose
| > > that option or 'Enable all macros' and the bar doesn't appear. Could
it be
| > > hidden somewhere?
| > >
| > > When I open the macro dialogue box in 'View Macros' they are all
listed
| > > but
| > > all options other than 'run' and 'step into' are greyed out.
| > >
| > > GM
| > >
| > >
| > > "Jim Rech" wrote:
| > >
| > >> If you have macro security set to "Disable all macros with
notification"
| > >> then after you open a workbook with macros you should see a "Security
| > >> warning" bar appear above the Formula bar. It has an Options button
that
| > >> you can use to enable macros.
| > >>
| > >> --
| > >> Jim
| > >> | > >> | I've looked through all the macro posts and can't solve this. I
| > >> converted
| > >> my
| > >> | .xls file to .xlsm (macro-enabled workbook) but still can't get the
| > >> macros
| > >> to
| > >> | operate.
| > >> |
| > >> | I get the message 'Because of your security settings, macros have
been
| > >> | disabled. To run macros, you need to reopen this workbook, and then
| > >> choose
| > >> to
| > >> | enable macros.'
| > >> |
| > >> | I have enabled all macros in the Trust Center and the VB tab shows
the
| > >> macro
| > >> | code.
| > >> |
| > >> | Anu suggestions?
| > >>
| > >>
| > >>
| >
| >
| >
 
J

Jon Peltier

I did just what you described, and the macro in my protected VB project ran
just fine. And I don't have Jim's registry hack installed.

- Jon
 
J

Jim Rech

and the macro in my protected VB project ran just fine

I think it's a password protected workbook, Jon. If I recall correctly it's
even an issue if a sheet is protected. Have to confirm that when I get a
chance; going out right now<g>.
 
J

Jim Rech

So this is what I've found upon further review-

If a workbook is saved with encryption (Office menu, Prepare, Encrypt
Document) its macros do not run.

If Review tab, Protect Workbook, Protect Structure is selected, and a
password is supplied, macros do not run. Selecting Protect Windows does not
block macros however.

Protect sheet does not block macros.

In both blocked cases the registry entry I gave allows macros to run. The
reason given in the Security Warning Options message box is that the file is
encrypted and there is no virus software installed that can scan it. The
files do seem to be partially encrypted in both cases so presumably no virus
scanning software could scan the file, at least without first getting the
password.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top