Securing VBA projects

It seems that nowadays we can add security to pretty much every aspect of the Microsoft Dynamics GP application, but when it comes to VBA projects things are not too clear for many developers and Dynamics GP systems administrators.

Follow these simple steps to secure your VBA project.

1. Open the Visual Basic Editor. Go to Microsoft Dynamics GP > Tools > Customize > Visual Basic Editor, or press ALT+F11 from your keyboard.

2. Open the project's Properties window. Right-click on the project within Project Explorer and select the project Properties option. You can also access the project Properties window by highlighting the project and using the Tools menu.




3. Click on the Protection tab, then click on the Lock project for viewing checkmark.




4. Enter a password to prevent unauthorized access, then confirm the password entered.



5. Press Ok to apply the settings.

6. Save your VBA project and exit Dynamics GP. When you access the application next time and attempt to access your VBA project you will be prompted to enter a password to display it's content.



If you have multiple projects, you will need to apply security individually to each by following the above outlined steps. Hopefully you will use the same password across to make things easier :-)

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Comments

Prakash said…
Hi Mariano,

I have protected the vba code as you said. If i have exported the vba package and open the package with a notepad, then i can able to view all the vba code.

Is there any other solution available to protect or encrypt the vba code?

Thanks,
Prakash
Mariano Gomez said…
Prakash,

Not that I am aware of. You can of course, store your code in a secure code repository such as Visual SourceSafe.

You can also limit security to the Customization Maintenance window, but eventually, when the package file is exported, it will need to be manipulated by authorized users and/or system administrators to minimize the risk of this occurring.

Best regards,

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Popular posts from this blog

DBMS: 12 Microsoft Dynamics GP: 0 error when updating to Microsoft Dynamics GP 2013 R2

Cannot insert the value NULL into column 'CONTACT' error when clicking on Items List in Navigation Pane

How to uninstall Microsoft Dynamics GP 10.0 if you cannot uninstall it by using the "Add or Remove Programs" feature