Protecting my VBA based query programming

  • Thread starter Thread starter Astra
  • Start date Start date
A

Astra

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
 
Hi

You can do it in vba
tools - VBA properties
insert project name
sheet protection : insert pasword
if there is a bug, you even can't choose debug and so
can't enter the macro's

good luck
Tom
 
Robbie,

If you select the project in the VBE, and then right-click it, you will get
a menu. Select Properties from that menu, and set a password on the
Protection tab.

Be aware, it is only good enough to stop the casual browser, not the
knowledgeable 'thief'.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Astra said:
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
 
Many thanks guys



Astra said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top