![]() |
Protecting my VBA based query programming
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 |
Protecting my VBA based query programming
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 -----Original 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 . |
Protecting my VBA based query programming
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" 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 |
Protecting my VBA based query programming
"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 |
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 |
All times are GMT +1. The time now is 11:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com