View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Astra Astra is offline
external usenet poster
 
Posts: 2
Default Protecting my VBA based query programming

Many thanks guys


"Fredrik Wahlgren" wrote in message
...

"Astra" wrote in message
...
Hi All

I've created quite a number of ADO/SQL/Query routines in the VBA/Macros

side
of MS Excel for PC so that buttons and fields on the Worksheet query SQL
databases and this works fine.

My problem is that anybody can see and 'extract' the work that I've done

by
going to Tools/Macros/Visual Editor and looking at in the code.

Is there any way I can disable/stop people from seeing the code side of a
workbook when I send it to them without affecting how the rest of the
Workbook works?

Thanks

Robbie


Not really, not with VBA anyway.

The only way to protect the code is to use a compiled language like VB6 or
C++. This means you have to make a COM add-in. It's quite easy with VB6. In
your case, protection is complicated by the fact that someone may be able to
do a sql trace and use it to figure out what your code looks like. If you
really want to protect your query routines, you should use stored
procedures. What database do you use?

Best Reagards,
Fredrik