#1   Report Post  
JulieD
 
Posts: n/a
Default 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.



  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

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.


  #4   Report Post  
SharonP.
 
Posts: n/a
Default

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

  #5   Report Post  
Ron de Bruin
 
Posts: n/a
Default

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





  #6   Report Post  
SharonP.
 
Posts: n/a
Default

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




  #7   Report Post  
Just Learning
 
Posts: n/a
Default

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect Macros nc Excel Discussion (Misc queries) 8 March 23rd 05 03:24 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
sorting with macros Sorting in macros Excel Discussion (Misc queries) 1 February 1st 05 09:02 AM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
Macros disappear after a file is imported Brent E Excel Discussion (Misc queries) 1 December 18th 04 12:25 AM


All times are GMT +1. The time now is 05:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"