View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default VBA Code Security

DLL is the best way to do it, but you won't achieve that with Office 97
(AFAIK). You will need a proper version of VB, or Office 2000 Developers
Edition (and above).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"TJ Walls" wrote in message
pam.com...
Hello All,

I have been reading the newsgroups in earnest, and there doesn't seem to
be a clear answer for this (even dating back to Office 97!).

I am writing a VBA for Excel application and would like to distribute it
openly (thus, I don't care about controling distribution, etc...). But
there is a way I do certain things that I don't want the general public to
see. I am competent in security but still new to Excel and VBA.

I know the trivial answer is the "Lock Project From Viewing" option in
VBE, but I have also read that this password (along with all Excel
internal passwords) are _trivial_ to crack (brute force under an hour on a
modern workstation is trivial to me). The code I'm trying to protect is in
a Workbook that has no purpose except to be a container for the VBA code
which will open the Workbooks that the user can interact with.

So I have two questions I can't seem to sort out from previous posts:

1) What is the best (most secure / easiest to implement) way to supply
code to users in Office Applications while protecting the "high level"
code. Again, I have no problem handing out compiled code. I understand
that anyone who can read Hex can reverse engineer my code, but this level
of security is sufficient for me to slept at night. I am mostly concenered
with keeping out relatively mature script kiddies.

2) From my reading, I think the answer to (1) is to create a DLL (or
EXE?). If so, is this possible with just the Office '97 package? Can
someone please help get me started on how to create / load a DLL from my

VBA code?

Thanks,
TJ Walls
Ph.D. Candidate - Dept. of Physics, Stony Brook University