PDA

View Full Version : External Data SQL Server & Destination



Kieth Lard
11-25-2010, 03:43 AM
I have inherited a suite of 2003 .xls that connect to an external data source.

However, I cannot get the details of the external data source, where do I look. It’s not in the vb code, and not available from the External Data drop down either. I must be missing something obvious.


As a follow on issue, when the .xls is ‘Run’ from a command button the data is always positioned at 8,2 which I guess is the destination parameter. Without getting at the details of the above data source, how can I change the position that the query table puts the data.

Jan Karel Pieterse
11-25-2010, 07:29 AM
If you select a cell in any external data range, you can do this:

Alt-F11 to the VBA editor
controlg-g to the immediate window
type this:
?activecell.querytable.Connection
and hit enter to get the connection string
?ActiveCell.Querytable.CommandText
to get the query.