Protecting VBA Code

  • Thread starter Thread starter Kirk
  • Start date Start date
K

Kirk

I know this was posted before, but I can't seem to find
the responses to it.

I need to be able to protect the VBA code that I have in
my spreadsheet so that only those who are approved to
make changes to the backend can do so. Is there a way to
Password protect getting to the VBA code?

Any help would be appreciated. Thanks.

Kirk
 
Kirk, To protect the VBA project, from your workbook right-click the
workbook's icon and pick View Code. This icon is to the left of the "File"
menu this will open the VBA editor, in the left hand window right click on
your workbook name and select VBA project properties, protection, check lock
project for viewing and set a password. Press Alt and Q to close this window
and go back to your workbook and save and close the file

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Hi Kirk,

Yes it was posted yesterday, "Protecting a Macro" was the title. Here you
go again thought :)

In the visual basic editor (Alt + F11)
From the menus select "Tools/VbaProject Properties
Select "Protection" at top
Select "Lock Project for Viewing" check box
Enter a password twice and click "Okay"
Save the workbook and next time you open it the Vba is protected.

Regards, Rocky McKinley
 
Back
Top