ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Test For Macro Security Settings Level (https://www.excelbanter.com/excel-programming/334114-test-macro-security-settings-level.html)

Tony White[_2_]

Test For Macro Security Settings Level
 
Hello All
I distribute a report in my company and I use code to fill drop-down boxes
and change between sheets. Since I use a pivot table to fill the drop-down
boxes and call on PivotCache, I test in the workbook_open even to see what
version of excel is running. I am able to successfully allow 2000 and higher
users to open the book and close the workbook for 97 and earlier however some
users have their security settings set to high and they are able to open the
workbook by the code to fill the drop-down boxes has not run.

Is there a way to test what the security level is? I want to return a msgbox
which tells the user to change their security settings to Medium as I do with
the 97 users (I tell them to upgrade to 2000)

Thank for your help!
--
Anthony White


Alan

Test For Macro Security Settings Level
 
"Tony White" wrote in message
...

Hello All
I distribute a report in my company and I use code to fill drop-down
boxes and change between sheets. Since I use a pivot table to fill
the drop-down boxes and call on PivotCache, I test in the
workbook_open even to see what version of excel is running. I am
able to successfully allow 2000 and higher users to open the book
and close the workbook for 97 and earlier however some users have
their security settings set to high and they are able to open the
workbook by the code to fill the drop-down boxes has not run.

Is there a way to test what the security level is? I want to return
a msgbox which tells the user to change their security settings to
Medium as I do with the 97 users (I tell them to upgrade to 2000)

Thank for your help!
--
Anthony White


Hi Anthony,

Since they have disabled macros you cannot have anything run
automatically to check.

My response in that situation would be to ensure that when you
distribute the workbook, the relevant sheets are 'very hidden' and
only an instruction sheet is visible saying that the workbook required
macros to be enabled.

In the Workbook_Open event code, just hide that sheet, and unhide the
others.

HTH,

Alan.








Tony White[_3_]

Test For Macro Security Settings Level
 
OK. That sounds like a good plan. Hopefully they follow directions instead of
unhiding the hidden sheets.

If anyone knows a way to prevent them from unhiding the sheets, I'd like to
know as some of these folks don't read or follow directions :)

Thanks Alan!

"Alan" wrote:

"Tony White" wrote in message
...

Hello All
I distribute a report in my company and I use code to fill drop-down
boxes and change between sheets. Since I use a pivot table to fill
the drop-down boxes and call on PivotCache, I test in the
workbook_open even to see what version of excel is running. I am
able to successfully allow 2000 and higher users to open the book
and close the workbook for 97 and earlier however some users have
their security settings set to high and they are able to open the
workbook by the code to fill the drop-down boxes has not run.

Is there a way to test what the security level is? I want to return
a msgbox which tells the user to change their security settings to
Medium as I do with the 97 users (I tell them to upgrade to 2000)

Thank for your help!
--
Anthony White


Hi Anthony,

Since they have disabled macros you cannot have anything run
automatically to check.

My response in that situation would be to ensure that when you
distribute the workbook, the relevant sheets are 'very hidden' and
only an instruction sheet is visible saying that the workbook required
macros to be enabled.

In the Workbook_Open event code, just hide that sheet, and unhide the
others.

HTH,

Alan.









Alan

Test For Macro Security Settings Level
 
"Tony White" <Tony wrote in message
...

OK. That sounds like a good plan. Hopefully they follow directions
instead of unhiding the hidden sheets.

If anyone knows a way to prevent them from unhiding the sheets, I'd
like to know as some of these folks don't read or follow directions
:)

Thanks Alan!


Hi Tony,

My take on that is that for someone to even *know* how to change a
sheet from veryhidden to visible means they are probably a relative
expert in excel being able to use the VBE and Immediate Window
therein - most 'power users' won't even know how to do that.

If they choose to go down that route and not follow instructions, then
they are being deliberately awkward and / or malicious and in a
corporate scenario that should imply a serious career discussion with
their manager.

When using excel, as a 'developer' all you can really do is make it
plain what the user needs to do, and take reasonable precautions to
stop things going wrong - you cannot fully secure a basic excel
workbook in a practical way and if you need that level of 'bullet
proofing' then excel is probably not the right tool for the job.

Either way - Good luck!

Alan.







All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com