S
Steff
This is quite possibly a stupid question, but I would be grateful for
any assistance.
I'm bumbling along trying to work out how to query an SQL Server
database, passing in parameters from certain cells on my spreadsheet
and using a VB Control button connected to some ADO code calling a
stored procedure on the database. I've patched all this together from
various sources on this forum and it seems to be working OK.
It will be saved on a network and I enviseage many users will be using
the spreadsheet to extract information from the database in a format
relevant to them. They will presumably want to save the query results
somewhere else for analysis.
Therefore I have added a couple of other control buttons to copy the
query results to another spreadsheet and to clear the query results
altogether from the master spreadsheet.
However, even if I protect the master spreadsheet and make it
read-only, users will still be able to Save-As and give it another
name. Surely this will then also save another copy of the macro as
well, which will be both annoying the users, and possibly potentially
harmful.
This is my first exposure to ADO, and I've only done very basic macro
work up until now. Surely it is not a good idea to have the ADO
Connection string information proliferating like this? How can I allow
users to run the queries and save the output, but prevent them from
copying the macros?
I'm sure there is a simple explanation, since ADO is so widely used so
be gentle with me if I have completely missed the point, but I'm
struggling to see how I can effectively roll out this solution.
any assistance.
I'm bumbling along trying to work out how to query an SQL Server
database, passing in parameters from certain cells on my spreadsheet
and using a VB Control button connected to some ADO code calling a
stored procedure on the database. I've patched all this together from
various sources on this forum and it seems to be working OK.
It will be saved on a network and I enviseage many users will be using
the spreadsheet to extract information from the database in a format
relevant to them. They will presumably want to save the query results
somewhere else for analysis.
Therefore I have added a couple of other control buttons to copy the
query results to another spreadsheet and to clear the query results
altogether from the master spreadsheet.
However, even if I protect the master spreadsheet and make it
read-only, users will still be able to Save-As and give it another
name. Surely this will then also save another copy of the macro as
well, which will be both annoying the users, and possibly potentially
harmful.
This is my first exposure to ADO, and I've only done very basic macro
work up until now. Surely it is not a good idea to have the ADO
Connection string information proliferating like this? How can I allow
users to run the queries and save the output, but prevent them from
copying the macros?
I'm sure there is a simple explanation, since ADO is so widely used so
be gentle with me if I have completely missed the point, but I'm
struggling to see how I can effectively roll out this solution.