Solved

Can I prevent people from accessing VBE in Excel?

Posted on 2011-09-30
3
279 Views
Last Modified: 2012-08-14
Can I make the VBE access password protected in Excel? Whether is through macro or Alt+F11?  
0
Comment
Question by:fitaliano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
Subnet_This earned 500 total points
ID: 36892506
To protect your code, do the following:

Open the Excel Workbook and go to Tools>Macro>Visual Basic Editor (Alt+F11). Now, from within the VBE go to Tools>VBAProject Properties and then click the Protection page tab and then check "Lock project from viewing" and then enter your password and again to confirm it. After doing this you must save, close & reopen the Workbook for the protection to take effect.
0
 
LVL 3

Expert Comment

by:kaosyeti
ID: 36892867
subnet this is correct.  also, while your vbe is protected this way, the properties box in the developer tab cannot be viewed, even while the worksheet is unprotected.  also, if there is an issue with your code that activates the debugger, it cannot be used until the password is entered in the vb editor.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 36894567
Do be aware, though, that this password is not secure.  There are numerous free/cheap utilities available via quick Google search that will shred the password in a few seconds.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question