Wednesday, January 14, 2009

Password Protect Your VB Project

I've wanted to password protect the code of my first project using VB and ArcObjects, and again the examples I found were not what I was looking to use. Here is a very simple way to limit access to Microsoft Visual Basic code in Excel and ArcMap.
  • From the Microsoft Visual Basic project window, choose
    Tools :: Project Properties
  • Choose the Protection tab
  • Check the box to "Lock project for viewing," set a password, and hit OK.




Once the project is closed (or another/new project is opened) and reloaded, viewing or editing any code will be restricted until the password is entered. Full access is granted for the remainder of the time that the project is loaded.




The code is even restricted during an error.


No comments: