Code for existing links

  • Thread starter Thread starter Sandy
  • Start date Start date
S

Sandy

Can anyone tell me where the VBA for existing links is
located in an Excel spreadsheet linked to an Access DB?

Sandy
 
There is no VBA associated with links between Excel and Access. All VBA
code will be found either in a general module or class module associated
with the workbook - and there is no VBA code with links established to
Data=>Get External data or using the Pivot table wizard.

Regards,
Tom Ogilvy
 
Dear Tom:

Thanks for your reply.

Do you know if there is a way I can get a list of links in
Excel? I need to know which columns in Excel map to which
columns in the Access database.

Sandy
 
Dim qtbl as QueryTable
for each sh in ThisWorkbook.Worksheets
for each qtbl in sh.QueryTables
msgbox qtbl.sql
Next
Next

should show you the select statement. To the best of my knowledge, the
order in the select tables is assigned to the columns sequentially from the
first column.

Regards,
Tom Ogilvy
 
Back
Top