#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Protecting a macro

I am going to distribute a spreadsheet that contains some macros. Is it
possible to prevent users from being able to access the code in the macros?

Ie. stop them going Tools | Macros | Edit?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Protecting a macro

Danny,

Yes and strangely enough no!!

You can protect your code by going to the VB editor and then

Tools|VBProject properties|protection
lock project for viewing and apply a password..
That's the Yes bit

The No bit is because the protection is pretty flimsy and cheap commercial
software can remove the passowrd.

Mike

"DannyS" wrote:

I am going to distribute a spreadsheet that contains some macros. Is it
possible to prevent users from being able to access the code in the macros?

Ie. stop them going Tools | Macros | Edit?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Protecting a macro

You might make the Extra Macro option HIDE
and turn off ALT-F11
Download add-in James 2007 from www.allocator.nl
and check Maintenance option Macro.

"DannyS" wrote:

I am going to distribute a spreadsheet that contains some macros. Is it
possible to prevent users from being able to access the code in the macros?

Ie. stop them going Tools | Macros | Edit?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Protecting a macro


Great, thanks Mike.

The problem was that one of my Macros does an unprotect then a re-protect of
the worksheet, and therefore I have to specify the unprotect password. I
wanted to stop users from viewing the code and hence obtaining the unprotect
password.

Is the worksheet protection password just as easily cracked as the macro
protection?

Thanks again, Danny

"Mike H" wrote:

Danny,

Yes and strangely enough no!!

You can protect your code by going to the VB editor and then

Tools|VBProject properties|protection
lock project for viewing and apply a password..
That's the Yes bit

The No bit is because the protection is pretty flimsy and cheap commercial
software can remove the passowrd.

Mike

"DannyS" wrote:

I am going to distribute a spreadsheet that contains some macros. Is it
possible to prevent users from being able to access the code in the macros?

Ie. stop them going Tools | Macros | Edit?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Protecting a macro

Worksheet protection is more easily broken than is VBAProject protection.

See John McGimpsey's site for more info.

http://www.mcgimpsey.com/excel/removepwords.html


Gord Dibben MS Excel MVP

On Wed, 5 Sep 2007 02:54:00 -0700, DannyS
wrote:


Great, thanks Mike.

The problem was that one of my Macros does an unprotect then a re-protect of
the worksheet, and therefore I have to specify the unprotect password. I
wanted to stop users from viewing the code and hence obtaining the unprotect
password.

Is the worksheet protection password just as easily cracked as the macro
protection?

Thanks again, Danny

"Mike H" wrote:

Danny,

Yes and strangely enough no!!

You can protect your code by going to the VB editor and then

Tools|VBProject properties|protection
lock project for viewing and apply a password..
That's the Yes bit

The No bit is because the protection is pretty flimsy and cheap commercial
software can remove the passowrd.

Mike

"DannyS" wrote:

I am going to distribute a spreadsheet that contains some macros. Is it
possible to prevent users from being able to access the code in the macros?

Ie. stop them going Tools | Macros | Edit?

Thanks!


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
Protecting columns? HRIS CHI Excel Worksheet Functions 1 June 8th 06 07:15 PM
Protecting Macro and selected sheets ST Excel Discussion (Misc queries) 1 June 6th 06 03:03 PM
hiding macro codes upon protecting the worksheet eehj23 Excel Discussion (Misc queries) 1 April 28th 06 03:55 AM
protecting... Mon Excel Discussion (Misc queries) 2 December 8th 05 07:59 PM
macro for Protecting a Sheet cincode5 Excel Discussion (Misc queries) 5 July 20th 05 11:59 AM


All times are GMT +1. The time now is 10:07 AM.

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

About Us

"It's about Microsoft Excel"