![]() |
startign with VBA
i want to ask if have an exceh sheet and it contains some codes
but if this file is opened in excel that have the security high it does not work so i want a sloution that if i have i file has some codes must run these codes on any MS OFFICE even if the security was high i want to run the codes automatically without the user changes the security at the end so i want to run some codes even if the security is higth or some code that changes the excel securtiy to low or something like that and thank you so much for your cooperation Walid M. Bahgat |
startign with VBA
You can't. That would defeat the purpose of the security setting. If you
could do it then any malicious code writer could do it. The user must allow macros to run. What I have done is to create a Warning Sheet that says something like "You must allow macros to run to use this Workbook. Close this Workbook, change your security to Medium (Tools/Macro/Security), and re-open Workbook. Select the 'Enable Macros' button on the Pop-Up Box." In the Workbook_Open event I would Hide this Warning sheet and Unhide all the other necessary workbook sheets. In the Workbook_Close event I would Unhide the Warning sheet and Hide all other sheets. Now when they open the workbook on High Security, the only sheet visible is the Warning. If they open it with Low or Medium w/Macros Enabled, then the Workbook_Open event will run, giving them access to the Workbook. Hope this will help. Mike F "Walid M. Bahgat" wrote in message ... i want to ask if have an exceh sheet and it contains some codes but if this file is opened in excel that have the security high it does not work so i want a sloution that if i have i file has some codes must run these codes on any MS OFFICE even if the security was high i want to run the codes automatically without the user changes the security at the end so i want to run some codes even if the security is higth or some code that changes the excel securtiy to low or something like that and thank you so much for your cooperation Walid M. Bahgat |
startign with VBA
Good afternoon Walid M. Bahgat I believe it is possible - though I haven't actually done it personall - by editing the registry settings through VBA, the home of the securit setting being : HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Security Alternatively, set yourself up with a digital certificate or (i possible) code your project as an add-in. Either of these two ways wil prevent the macro warning message from appearing. HTH Dominic -- dominic ----------------------------------------------------------------------- dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893 View this thread: http://www.excelforum.com/showthread.php?threadid=46845 |
startign with VBA
Hi Walid,
See : http://tinyurl.com/798o6 --- Regards, Norman "Walid M. Bahgat" wrote in message ... i want to ask if have an exceh sheet and it contains some codes but if this file is opened in excel that have the security high it does not work so i want a sloution that if i have i file has some codes must run these codes on any MS OFFICE even if the security was high i want to run the codes automatically without the user changes the security at the end so i want to run some codes even if the security is higth or some code that changes the excel securtiy to low or something like that and thank you so much for your cooperation Walid M. Bahgat |
startign with VBA
Isn't that a Catch22? With security set to high, you won't be able to run
VBA code to edit the registry. At any rate, after editing the registry, you still have to close and reopen Excel to make the security changes effective. "dominicb" wrote: Good afternoon Walid M. Bahgat I believe it is possible - though I haven't actually done it personally - by editing the registry settings through VBA, the home of the security setting being : HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Security Alternatively, set yourself up with a digital certificate or (if possible) code your project as an add-in. Either of these two ways will prevent the macro warning message from appearing. HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=468457 |
All times are GMT +1. The time now is 12:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com