P
Paul Kraemer
Hi,
I have an Excel 2003 workbook in which I use MS Query to get data from a SQL
Server database. The query returns records to an External Data Range defined
on one of my worksheets. This works great as long as the PC I open the
workbook on is able to connect to the SQL Server.
At times, however, I want to generate a copy of this workbook that does not
require a connection to the SQL server. To do this, I right-click in the
External Data Range and choose Properties. In the External Data Range
Properties dialog box, I clear the checkbox for "Save Query Definition".
This does just what I want - it removes the underlying query but retains the
data. I save the workbook to a different filename, email it to whoever I
want, and they can view the data without a connection to the SQL server.
I would like to be able to automate this. Can I use VBA to accomplish the
same thing as when I clear the "Save Query Definition" checkbox? If anyone
could tell me how to do this or where I can find instructions, I would
appreciate it. I can't seem to find it in online help.
Thanks,
paul
I have an Excel 2003 workbook in which I use MS Query to get data from a SQL
Server database. The query returns records to an External Data Range defined
on one of my worksheets. This works great as long as the PC I open the
workbook on is able to connect to the SQL Server.
At times, however, I want to generate a copy of this workbook that does not
require a connection to the SQL server. To do this, I right-click in the
External Data Range and choose Properties. In the External Data Range
Properties dialog box, I clear the checkbox for "Save Query Definition".
This does just what I want - it removes the underlying query but retains the
data. I save the workbook to a different filename, email it to whoever I
want, and they can view the data without a connection to the SQL server.
I would like to be able to automate this. Can I use VBA to accomplish the
same thing as when I clear the "Save Query Definition" checkbox? If anyone
could tell me how to do this or where I can find instructions, I would
appreciate it. I can't seem to find it in online help.
Thanks,
paul