Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
I have a Userform that I would like to have users force to "enable macros".
Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
no. enabling macros is a security issue. yo cannot use code to override this.
If you could m then spammers and malware would be able to. that would be a BAD thing. Also, if code is not enabled, you wouldn't be able to launch the th userform. and if its disabled, what happens to the code that running to generate the userform? "TotallyConfused" wrote: I have a Userform that I would like to have users force to "enable macros". Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
Nope.
All you can really do is make the relevant sheets etc very invisible, lock your VB project and have code to unhide the sheets. This way if the user enables macros they'll see they're fine, if they don't then they can't use your workbook. Sam "TotallyConfused" wrote: I have a Userform that I would like to have users force to "enable macros". Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
Thank you for your responses. For the part users will not want to mess with
the form. However, there is alway a wise guy. Just want to be able to protect form and wise guys from changing any code. How do I lock up my VB project? My worksheets are already hidden but not with code. How do I do that? Thank you all for your help. Very much appreciated. "Sam Wilson" wrote: Nope. All you can really do is make the relevant sheets etc very invisible, lock your VB project and have code to unhide the sheets. This way if the user enables macros they'll see they're fine, if they don't then they can't use your workbook. Sam "TotallyConfused" wrote: I have a Userform that I would like to have users force to "enable macros". Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
In the VB window, highlight the relevant sheet in the project explorer, and
in the properties window set "Visible" to "-2 - xlSheetVeryHidden" Once you've done this, right click your project and go to VBAProjectProperties, and protection and tick "Lock project for viewing" - put a password in but definitely don't forget it - if you do then it's virtually impossible to recover. You then need to create a workbook open event which does something along the lines of dim ws as worksheet for each ws in worksheets ws.visible = xlsheetvisible next ws and a workbook before close event: dim ws as worksheet for each ws in worksheets ws.visible = xlsheetveryhidden next ws "TotallyConfused" wrote: Thank you for your responses. For the part users will not want to mess with the form. However, there is alway a wise guy. Just want to be able to protect form and wise guys from changing any code. How do I lock up my VB project? My worksheets are already hidden but not with code. How do I do that? Thank you all for your help. Very much appreciated. "Sam Wilson" wrote: Nope. All you can really do is make the relevant sheets etc very invisible, lock your VB project and have code to unhide the sheets. This way if the user enables macros they'll see they're fine, if they don't then they can't use your workbook. Sam "TotallyConfused" wrote: I have a Userform that I would like to have users force to "enable macros". Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force "Enable" Macros on Userform
Inside the VBE.
select your workbook's project tools|vbaproject properties|protection tab Save, close and reopen your workbook to see how it works. TotallyConfused wrote: Thank you for your responses. For the part users will not want to mess with the form. However, there is alway a wise guy. Just want to be able to protect form and wise guys from changing any code. How do I lock up my VB project? My worksheets are already hidden but not with code. How do I do that? Thank you all for your help. Very much appreciated. "Sam Wilson" wrote: Nope. All you can really do is make the relevant sheets etc very invisible, lock your VB project and have code to unhide the sheets. This way if the user enables macros they'll see they're fine, if they don't then they can't use your workbook. Sam "TotallyConfused" wrote: I have a Userform that I would like to have users force to "enable macros". Do not want to give them an option to "disable macros". Can this be done? If so how? Thank you very much. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enable macros - security settings are at "enable all macros" | Excel Programming | |||
Computer freezes when user clicks "enable" macros | Excel Programming | |||
"openinf file..."ENABLE MACROS...DISABLE MACROS" | Excel Discussion (Misc queries) | |||
"Enable, Disable macros" window does not pop up, security is medi | Excel Programming | |||
Code to ignore on-screen message concerning "Enable Macros." | Excel Programming |