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

Hello,
I have a spreadsheet which I've added a macro button onto to quickly
password protect all worksheets, I send this spreadsheet out to others and
have realised they can easily access the macro and unprotect the worksheets,
is there any way I can protect the macro so others can't run it?
:-)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Protecting a macro

Strange you did not receive a lot of answers...
You should lock your project to prevent accessing the code. However, be
aware that this is a weak protection.
HTH
Daniel

Hello,
I have a spreadsheet which I've added a macro button onto to quickly
password protect all worksheets, I send this spreadsheet out to others and
have realised they can easily access the macro and unprotect the worksheets,
is there any way I can protect the macro so others can't run it?
:-)



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

Thanks for that, how do I lock it?
Is there a stronger protection?

"NZuser" wrote:

Hello,
I have a spreadsheet which I've added a macro button onto to quickly
password protect all worksheets, I send this spreadsheet out to others and
have realised they can easily access the macro and unprotect the worksheets,
is there any way I can protect the macro so others can't run it?
:-)

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

In the VBE window, click on the project name (VBAProject...), right
click and choose "Properties", "Protect" tab and fill.
Daniel

Thanks for that, how do I lock it?
Is there a stronger protection?

"NZuser" wrote:

Hello,
I have a spreadsheet which I've added a macro button onto to quickly
password protect all worksheets, I send this spreadsheet out to others and
have realised they can easily access the macro and unprotect the worksheets,
is there any way I can protect the macro so others can't run it?
:-)



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

Hi NZuser,

If you move the macro from the existing workbook to your Personal.xls file (see Excel Help for details), that means only you will
have access to the macro. That's far more secure than anything you can do that involves distributing the macro with the file.

An alternative is to not hardcode the password into the protection macro but to solicit the password via an InputBox.

--
Cheers
macropod
[MVP - Microsoft Word]


"NZuser" wrote in message ...
Thanks for that, how do I lock it?
Is there a stronger protection?

"NZuser" wrote:

Hello,
I have a spreadsheet which I've added a macro button onto to quickly
password protect all worksheets, I send this spreadsheet out to others and
have realised they can easily access the macro and unprotect the worksheets,
is there any way I can protect the macro so others can't run it?
:-)




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
Macro- not re-password protecting Roady Excel Discussion (Misc queries) 1 July 19th 08 01:05 AM
Macro for protecting sheet JoeP Excel Discussion (Misc queries) 2 November 27th 07 12:05 AM
Protecting sheet that has macro ub Excel Worksheet Functions 5 October 6th 07 12:37 AM
Protecting a macro DannyS Excel Discussion (Misc queries) 4 September 5th 07 02:38 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 12:37 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"