Author Topic: VBA Serendipity  (Read 1618 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16721
  • Superior Stupidity at its best
VBA Serendipity
« 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....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Trev

  • Guest
VBA Serendipity
« Reply #1 on: November 03, 2004, 01:53:45 AM »
Hey Keith thats a neat find.
Very useful too.