Two object exist for picking data from SQL-S to Excel, ie pivottable and
querytable.
The connection property is reachable by code in VBA with something like:
?Activesheet.querytables(1).connection
?activesheet.pivottables(1).pivotcache.connection
in the debug window reached in VBA by Alt/F11 in Excel if you clcik on the
sheet containing the data.
The connection property could also be changed in the Excel interface:
If a querytable right/click in the table and select Edit Query to enter yhe
wizard for building the query. If a pivottable right/click and select wizard.
All connections are based on ODBC so to get it reachable for many users could
be a bit tricky since the ODBC-connection is either a file or an entry in the
registry in the user's machine....
Good Luck

Signature
Rickard Olsson, Sweden
www.ricol.se/ricoleng
> We have an Excel spreadsheet that was created by someone who left the
> company and who did not document what they had done. This spreadsheet is
[quoted text clipped - 26 lines]
> Michael MacGregor
> Database Architect (not an Excel expert at all!)
Michael MacGregor - 21 Sep 2006 14:48 GMT
Ok, I know absolutely nothing about VBA, so I'm afraid I'm still lost as to
where to find this information. I did Alt-F11 but where then do I go to find
the connection parameters, if there are any?
I tried using the Edit Query, but I can't figure out how to get to it. It
looks like it might be PivotTable because when I right-click in a data cell,
the context menu lists PivotTable Wizard, but how do I get to the connection
properties using that?
This is a networked file, I don't have any suitable ODBC connections defined
on my PC but I can alter the connection properties when the dialog window is
displayed and it will connect.
I find it very difficult to get to this information, couldn't MS have
designed this better.
Thanks for your response.
Michael MacGregor
Database Architect