![]() |
Protect macros?
Hi
you can password protect the vba project (ie the macros), press ALT & F11 to switch to the VBE editor, find your workbook's name in the Project Explorer (view / project explorer) right mouse click on it choose VBAProject Properties Go to the protection tab tick the check box and put a password in. -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway wrote in message ... How can I keep a user from accessing macros in a spreadsheet. I have some of the macros run when needed via VBA, and I have other macros that I use for such things as protecting or unprotecting all or selected sheets as needed. But I don't want the other users to be able to manually access the macros. Thanks for any help. |
Just be aware that Excel's protection is not invincible. There are commercial
password breakers as well as free methods (ie hex editor) available to break VBA project passwords. A persistent individual with access to the internet could view your code if they really wanted to. HTH Jason Atlanta, GA " wrote: How can I keep a user from accessing macros in a spreadsheet. I have some of the macros run when needed via VBA, and I have other macros that I use for such things as protecting or unprotecting all or selected sheets as needed. But I don't want the other users to be able to manually access the macros. Thanks for any help. |
Dave, I'm working with this hint and am having a problem/question.
When I add this Option Private Module as a Declaration - is is not visible in the Tool/Macro/Macros but I also can't run the macro either. What am I missing. I don't want the macro viewable for the general public but I need to run it still. "Dave Peterson" wrote: If you add: Option Private Module to the top of each general module, then the names won't be visible in the Tools|macro|macros... dialog. wrote: Thanks Julie. I had done that, but the user can still run a macro by selecting Tools/Macro, selecting a macro, and clicking Run. Also, I realize that worksheet and workbook protection are easily bypassed. I just need to keep the user from stupidly running a macro that can screw up the book. On Thu, 12 May 2005 22:42:59 +0800, "JulieD" wrote: Hi you can password protect the vba project (ie the macros), press ALT & F11 to switch to the VBE editor, find your workbook's name in the Project Explorer (view / project explorer) right mouse click on it choose VBAProject Properties Go to the protection tab tick the check box and put a password in. -- Dave Peterson |
Hi Sharon
Press Alt F8 and enter the macro name -- Regards Ron de Bruin http://www.rondebruin.nl "SharonP." wrote in message ... Dave, I'm working with this hint and am having a problem/question. When I add this Option Private Module as a Declaration - is is not visible in the Tool/Macro/Macros but I also can't run the macro either. What am I missing. I don't want the macro viewable for the general public but I need to run it still. "Dave Peterson" wrote: If you add: Option Private Module to the top of each general module, then the names won't be visible in the Tools|macro|macros... dialog. wrote: Thanks Julie. I had done that, but the user can still run a macro by selecting Tools/Macro, selecting a macro, and clicking Run. Also, I realize that worksheet and workbook protection are easily bypassed. I just need to keep the user from stupidly running a macro that can screw up the book. On Thu, 12 May 2005 22:42:59 +0800, "JulieD" wrote: Hi you can password protect the vba project (ie the macros), press ALT & F11 to switch to the VBE editor, find your workbook's name in the Project Explorer (view / project explorer) right mouse click on it choose VBAProject Properties Go to the protection tab tick the check box and put a password in. -- Dave Peterson |
Thank you for the info. I'm surprised that worked especially since the
shortcut didn't. "Ron de Bruin" wrote: Hi Sharon Press Alt F8 and enter the macro name -- Regards Ron de Bruin http://www.rondebruin.nl "SharonP." wrote in message ... Dave, I'm working with this hint and am having a problem/question. When I add this Option Private Module as a Declaration - is is not visible in the Tool/Macro/Macros but I also can't run the macro either. What am I missing. I don't want the macro viewable for the general public but I need to run it still. "Dave Peterson" wrote: If you add: Option Private Module to the top of each general module, then the names won't be visible in the Tools|macro|macros... dialog. wrote: Thanks Julie. I had done that, but the user can still run a macro by selecting Tools/Macro, selecting a macro, and clicking Run. Also, I realize that worksheet and workbook protection are easily bypassed. I just need to keep the user from stupidly running a macro that can screw up the book. On Thu, 12 May 2005 22:42:59 +0800, "JulieD" wrote: Hi you can password protect the vba project (ie the macros), press ALT & F11 to switch to the VBE editor, find your workbook's name in the Project Explorer (view / project explorer) right mouse click on it choose VBAProject Properties Go to the protection tab tick the check box and put a password in. -- Dave Peterson |
Just wanted you all to know that I used the instructions below and it works
great! Just what I was looking for! Thanks loads! "Ron de Bruin" wrote: Hi Sharon Press Alt F8 and enter the macro name -- Regards Ron de Bruin http://www.rondebruin.nl "SharonP." wrote in message ... Dave, I'm working with this hint and am having a problem/question. When I add this Option Private Module as a Declaration - is is not visible in the Tool/Macro/Macros but I also can't run the macro either. What am I missing. I don't want the macro viewable for the general public but I need to run it still. "Dave Peterson" wrote: If you add: Option Private Module to the top of each general module, then the names won't be visible in the Tools|macro|macros... dialog. wrote: Thanks Julie. I had done that, but the user can still run a macro by selecting Tools/Macro, selecting a macro, and clicking Run. Also, I realize that worksheet and workbook protection are easily bypassed. I just need to keep the user from stupidly running a macro that can screw up the book. On Thu, 12 May 2005 22:42:59 +0800, "JulieD" wrote: Hi you can password protect the vba project (ie the macros), press ALT & F11 to switch to the VBE editor, find your workbook's name in the Project Explorer (view / project explorer) right mouse click on it choose VBAProject Properties Go to the protection tab tick the check box and put a password in. -- Dave Peterson |
All times are GMT +1. The time now is 12:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com