PC Review


Reply
Thread Tools Rate Thread

how to add a password to the VBA code?

 
 
cfman
Guest
Posts: n/a
 
      2nd Mar 2007
I mean the VBA code behind a macro in the Excel sheet so other people will
not be able to see the code while still able to run the macro?

Thanks a lot


 
Reply With Quote
 
 
 
 
Greg Maxey
Guest
Posts: n/a
 
      2nd Mar 2007
Right click the module name. Select project properties, then the protection
tab

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


cfman wrote:
> I mean the VBA code behind a macro in the Excel sheet so other people
> will not be able to see the code while still able to run the macro?
>
> Thanks a lot



 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      2nd Mar 2007
Open the Visual Basic Editor (Alt/F11)
Right click on the VBAProject(YourProject) in the left hand pane.
Select VBAProject Properties.
Click on the Protection tab.
Check "Lock project for viewing."
Enter a password twice.
Click OK.

Regards,

Alan


"cfman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I mean the VBA code behind a macro in the Excel sheet so other people will
>not be able to see the code while still able to run the macro?
>
> Thanks a lot
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      2nd Mar 2007
With your workbook open.

Alt + F11, CTRL + r

Right-click on your workbook/project and "Properties"

Select "Protection" tab and "lock project for viewing".

Enter a password.

Note: workbook must be saved/closed and re-opened before the locking takes
effect.


Gord Dibben MS Excel MVP

On Thu, 1 Mar 2007 18:18:52 -0800, "cfman" <(E-Mail Removed)> wrote:

>I mean the VBA code behind a macro in the Excel sheet so other people will
>not be able to see the code while still able to run the macro?
>
>Thanks a lot
>


 
Reply With Quote
 
=?Utf-8?B?bnVya3Vz?=
Guest
Posts: n/a
 
      2nd Mar 2007
Open the IDE (alt F11)
Select Tools then VBA Project Properties
Then select the protection tab, and lock the project for viewing

"cfman" wrote:

> I mean the VBA code behind a macro in the Excel sheet so other people will
> not be able to see the code while still able to run the macro?
>
> Thanks a lot
>
>
>

 
Reply With Quote
 
Karl E. Peterson
Guest
Posts: n/a
 
      5th Mar 2007
cfman <(E-Mail Removed)> wrote:
> I mean the VBA code behind a macro in the Excel sheet so other people will
> not be able to see the code while still able to run the macro?


You mean, those three "other people" who don't know about Google?
--
..NET: It's About Trust!
http://vfred.mvps.org


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
hard code a password in a vba code Dan Microsoft Excel Programming 2 22nd Apr 2009 04:44 AM
How to set a Password thru code? Mota Microsoft Access Form Coding 0 13th Sep 2005 11:31 PM
Re: password code? Jeff Conrad Microsoft Access Form Coding 1 10th Sep 2004 05:32 PM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Microsoft Excel Programming 0 27th Jan 2004 07:07 AM
Password Code Poppy Microsoft Access Security 0 21st Jan 2004 04:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 AM.