Protecting VBA code

  • Thread starter Thread starter JackJ
  • Start date Start date
J

JackJ

I probably do or should know this, as Ive been programming for years. But
the minds a blank and needs to be kick started again.

Programs abound everywhere to unprotect code or to find passwords.

How then can I protect my Excel VBA code? Can I compile it?
VB seems OK but then do I get a single, simple executible?
Or am I forced ro reprogram in C++ or even Delphi (that can produce very
tight stand-alone executibles)?

I apologise if the answer is obvious.
Thanks
 
JackJ said:
I probably do or should know this, as Ive been programming for years. But
the minds a blank and needs to be kick started again.

Programs abound everywhere to unprotect code or to find passwords.

How then can I protect my Excel VBA code? Can I compile it?
VB seems OK but then do I get a single, simple executible?
Or am I forced ro reprogram in C++ or even Delphi (that can produce very
tight stand-alone executibles)?

Read a thread with subject name "Distribute Excel Workbook with licence?" in
the newsgroup microsoft.public.excel.sdk. The original post is dated Feb 19,
2004. It may answer some of your questions.

HTH
***********************
Mohan Pawar
 
Thank you Mohan,
I have subscribed to newsgroup.microsoft.public.excel.sdk. But it wont
download a single message. I dont know why that should be. Is it possible
for you to post the thread through this group?
Your help is appreciated
Jack
________________
 
Thanks Harlan,
The thread was most interesting. The point I take from all that is that the
only way to protect Excel VBA code is to compile it. Anything less being a
waste of time.
My choices seem to be, an XLL or Com, compiled (which I have not done
before)
Delphi (which I have)- but then Ive got about 1200 lines of code to
translate.
I shudder. Is an XLL easy to create? Anyone?
Thanks
Jack
 
Hi Jack,

No XLL's are not easy to create, and they are written in C/C++ so you would
need such a compiler and the learning curve is steep. There is a neat tool
to handle the DLL/XLL port, but you need to port it to C/C++ first. To port
VBA code into a VB6 Com object is however generally pretty easy - but you
need a VB6 compiler :-( No idea about the difficulty of porting VBA to
Delphi.

Anyway you look at it, it's a lot of work. A VB6 Com object is almost
certainly the easiest route though.

Regards,

Peter Beach
 
Back
Top