Protecting VBA’s

Published on November 14, 2011

If you have done much MicroStation VBA development at all you realize how easy it is for a casual or curious user to open the VBA Editor and possibly break your code. For internal company deployments you can modify the security on the .mvba files so that these users have read-only access. When distributing your VBA’s to clients or consultants you may not have that level of control. The VBA Editor allows for password protecting your .mvba files. By protecting your files with a password users are still able to run the macros but cannot view or edit the source code without entering the password.

To password protect your VBA macro:

  1. Select Tools > Default Properties from the VBA Editor top menu bar.
  2. In the Project Properties dialog click the Protection tab.
  3. Enter your password into the password fields at the bottom
  4. Click the OK button in the dialog to save the password

CAD Training

Note: This password protection offers only minimal protection for your VBA. There are many VBA password cracking tools available that will allow more sophisticated users to bypass this protection measure.

Like this article? Share it!

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Privacy Policy