TheSwamp

Code Red => VB(A) => Topic started by: Keith™ on October 31, 2004, 09:26:00 PM

Title: VBA Serendipity
Post by: Keith™ on October 31, 2004, 09:26:00 PM
During the course of attempting to do something that I was told was impossible, I have stumbled upon a way to hide all VBA projects from prying eyes. It works like this ....

In the VBAIDE (your project) add a command reactor that is called when the VBAIDE window is opened. Then this reactor will call a procedure that will hide all of the currently loaded projects in the project window.

If a user wishes to edit VBA, they will have to unload your project and restart AutoCAD without it. This will prevent them from even selecting your project from the projects window thus never allowing them the opportunity to crack the password you might have on the VBA project, if you even have one.

Of course the drawback is that you cannot edit your own code once you turn on the command reactor....or at least I have not found a way to do it...
I just figured that this might be a neat way to prevent unauthorized users from messing with code that they should not be.

I was actually trying to find a way to enumerate the Outlook Express mail folders to extract data from the emails in a particular folder... Since I have not been able to obtain the file format of Outlook Express mail files (*.dbx) I was relegated to this approach.

I have an EXE that will hide the VBA projects after you open the VBAIDE and run the program..all I need to do is make a few minor modifications and all will be well....
Title: VBA Serendipity
Post by: Trev on November 03, 2004, 01:53:45 AM
Hey Keith thats a neat find.
Very useful too.