View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Protecting a VBA Project from viewing

You could always use two workbooks: one protected one with all the
"secret" stuff and one unprotected one which has the solver reference.
You could then expose the solver functions through the second workbook
to your code in the first one.

Caveat: never done this. But seems like it should work.

Tim.


"William Benson" wrote in
message ...
I need to protect a workbook's VBA project. But I do not know how to
do this while at the same time preserving the right to set and unset
references to dll's at runtime (My code adds the solver add-in and
sets a project reference to it). Not only that, I cannot let the user
set a reference manually and save the workbook, because I would have
to give them the VBA Project password in order to make this change.

I might save a workbook with reference already set, prior to
distributing, but I am sure that will result in broken links for
some users.

Can someone help me out of this Catch 22? My client does not want
the project viewable.

Is the answer to build compiled modules in an ActiveX.DLL? He
doesn't want to pay for that as of now.

Bill Benson