ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Password Protecting a Macro (https://www.excelbanter.com/excel-programming/286958-password-protecting-macro.html)

Marino13

Password Protecting a Macro
 
Is there a way to password protect a macro?

For example, I would like to set up a file that when the file is opened
you cannot view the macros associated with the file unless you have the
password?


---
Message posted from http://www.ExcelForum.com/


Paul B[_7_]

Password Protecting a Macro
 
Marino, you need 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
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **

"Marino13 " wrote in message
...
Is there a way to password protect a macro?

For example, I would like to set up a file that when the file is opened
you cannot view the macros associated with the file unless you have the
password?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com