Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
My application installs with a ton of messages that inform the user to
ENABLE MACROS when they open the program. I have even digitally signed it so (when their Excel security level is set to HIGH or MEDIUM) they can select me as a trusted source and enable macros. Guess what? Users don't read the instructions. So many of them still don't enable the macros and wonder why the program doesn't function properly. Is there a way to reset the security with VBA when my program opens? The phone calls are killing me. Thank you in advance. Jim Kobzeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
Hi Jim
A macro can not allow itself to run, no. But once it (or anything else, like a small external exe file) runs; the security setting is a registry key in HKEY_CURRENT_USER\Software\Microsoft\Office\(versi on)\Excel\Security and code can alter registry keys. It is not considered good practice, but a man's got to do what a man's got to do. HTH. Best wishes Harald "JK" skrev i melding news:aC2sd.604$S33.511@trnddc03... My application installs with a ton of messages that inform the user to ENABLE MACROS when they open the program. I have even digitally signed it so (when their Excel security level is set to HIGH or MEDIUM) they can select me as a trusted source and enable macros. Guess what? Users don't read the instructions. So many of them still don't enable the macros and wonder why the program doesn't function properly. Is there a way to reset the security with VBA when my program opens? The phone calls are killing me. Thank you in advance. Jim Kobzeff |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
Here is a possible solution. Use a dedicated sheet that is automatically
hidden through code at the on_open event. The only thing on the screen is a message that macros's are not enabled and the spread sheet will not work properly. If the code executes no problem, they never see the message. Otherwise, the first thing they see is the message. Hope this helps... "JK" wrote: My application installs with a ton of messages that inform the user to ENABLE MACROS when they open the program. I have even digitally signed it so (when their Excel security level is set to HIGH or MEDIUM) they can select me as a trusted source and enable macros. Guess what? Users don't read the instructions. So many of them still don't enable the macros and wonder why the program doesn't function properly. Is there a way to reset the security with VBA when my program opens? The phone calls are killing me. Thank you in advance. Jim Kobzeff |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
"Tushar Mehta" skrev i melding
... if you fiddle with the registry setting a la Harald's suggestion, and malicious code infects your user computer and your/their corporate networks, it won't be just phone calls you have to worry about. {grin} Hi Tushar Very good point. I've written "don't ever do that" too many times and gotten a few well earned "mind your own business" in return. I've learnt that sometimes there are valid, productive reasons to programmatically hijack a computer. I choose to (but don't really) believe that anyone skilled enough to do it is skilled enough to know the consequences. Ok, for the record: Don't fiddle with registry settings that deals with other applications than your own. Don't change screen resolution. Don't write system modal windows, forms or prompts. Don't disable functionality. Don't lower system security. Don't blame the norwegians. Best wishes Harald |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
Hi Harald,
My comment was not meant for you. It was intended in the same vein as your "for the record" warning, which, BTW, is both comprehensive and succinct. Though, I don't know about the Norwegian part. {g} Over in another forum where I have been spending more time lately, it is frustrating at the number of people who have just discovered how to record a macro and then post something along the lines of "I want to force my users to enable macros; then, I want to make sure they can do nothing other than what my macro allows. Give me the code." What is worse is the number of people who respond with solutions that are patently flawed and will, without doubt, cause a catastrophe at some point in the future. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , lid says... "Tushar Mehta" skrev i melding ... if you fiddle with the registry setting a la Harald's suggestion, and malicious code infects your user computer and your/their corporate networks, it won't be just phone calls you have to worry about. {grin} Hi Tushar Very good point. I've written "don't ever do that" too many times and gotten a few well earned "mind your own business" in return. I've learnt that sometimes there are valid, productive reasons to programmatically hijack a computer. I choose to (but don't really) believe that anyone skilled enough to do it is skilled enough to know the consequences. Ok, for the record: Don't fiddle with registry settings that deals with other applications than your own. Don't change screen resolution. Don't write system modal windows, forms or prompts. Don't disable functionality. Don't lower system security. Don't blame the norwegians. Best wishes Harald |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reset Security Level with VBA?
Jim -
Without disabling security of the host computer, you could write a short program in VB that when double-clicked will open your file in Excel (not VBA, but its big brother, which makes full executables). One Excel program can open another workbook that contains code, without triggering the warning, and so can the VB program. Short of this, the suggestion by Jim Thomlinson is the best, to make the workbook useless if macros are disabled, but with obvious instructions (large bold red text doesn't hurt) about what to do to correct the situation. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ JK wrote: My application installs with a ton of messages that inform the user to ENABLE MACROS when they open the program. I have even digitally signed it so (when their Excel security level is set to HIGH or MEDIUM) they can select me as a trusted source and enable macros. Guess what? Users don't read the instructions. So many of them still don't enable the macros and wonder why the program doesn't function properly. Is there a way to reset the security with VBA when my program opens? The phone calls are killing me. Thank you in advance. Jim Kobzeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros/Security Level | Excel Discussion (Misc queries) | |||
Read security level | Excel Programming | |||
Changing security level | Excel Programming | |||
Changing security level | Excel Programming | |||
Changing security level | Excel Programming |