Excel 2007 Macro Security

M

Martin

I used a tip from this forum on using the Workbook_Open event in Excel 2003
to determine if macro security levels would allow macros to execute. With
that, instructions could be provided to the users on how to change their
macro security level in order to run macros in Excel 2003.

Some of those users have converted to Excel 2007. From what I have seen of
Excel 2007, it will always open the file, but disable macros. In the
process, 2007 displays a message bar containing an option button that will
allow users to enable the macros. [I personally do not use Excel 2007, but
have seen this when watching other users. So bare with my limited
description.]

Is there a way in VBA to check to see if Excel 2007 has disabled macros? I
could then use that check to display instructions to the user on how to
enable the macros for use.

Thanks.
 
B

Bob Phillips

Use the standard technique of saving the workbook with a message sheet
displayed, all others hidden. When you open, unhide the rest, hide that one.
If macros are enabled, it will do that stuff, if not, your message is
displayed.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
M

Martin

I tried that and it does not seem to work. In Excel 2007, the file simply
opens, but has that message bar with the option to enable the macros. It
never displays the hidden message sheet as happens with Excel 2003.

Thanks.



Bob Phillips said:
Use the standard technique of saving the workbook with a message sheet
displayed, all others hidden. When you open, unhide the rest, hide that one.
If macros are enabled, it will do that stuff, if not, your message is
displayed.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

Martin said:
I used a tip from this forum on using the Workbook_Open event in Excel 2003
to determine if macro security levels would allow macros to execute. With
that, instructions could be provided to the users on how to change their
macro security level in order to run macros in Excel 2003.

Some of those users have converted to Excel 2007. From what I have seen
of
Excel 2007, it will always open the file, but disable macros. In the
process, 2007 displays a message bar containing an option button that will
allow users to enable the macros. [I personally do not use Excel 2007,
but
have seen this when watching other users. So bare with my limited
description.]

Is there a way in VBA to check to see if Excel 2007 has disabled macros?
I
could then use that check to display instructions to the user on how to
enable the macros for use.

Thanks.
 
B

Bob Phillips

If that is the only visible sheet, it will display it.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

Martin said:
I tried that and it does not seem to work. In Excel 2007, the file simply
opens, but has that message bar with the option to enable the macros. It
never displays the hidden message sheet as happens with Excel 2003.

Thanks.



Bob Phillips said:
Use the standard technique of saving the workbook with a message sheet
displayed, all others hidden. When you open, unhide the rest, hide that
one.
If macros are enabled, it will do that stuff, if not, your message is
displayed.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

Martin said:
I used a tip from this forum on using the Workbook_Open event in Excel
2003
to determine if macro security levels would allow macros to execute.
With
that, instructions could be provided to the users on how to change
their
macro security level in order to run macros in Excel 2003.

Some of those users have converted to Excel 2007. From what I have
seen
of
Excel 2007, it will always open the file, but disable macros. In the
process, 2007 displays a message bar containing an option button that
will
allow users to enable the macros. [I personally do not use Excel 2007,
but
have seen this when watching other users. So bare with my limited
description.]

Is there a way in VBA to check to see if Excel 2007 has disabled
macros?
I
could then use that check to display instructions to the user on how to
enable the macros for use.

Thanks.
 

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