0

I have tried to get a solution to my problem, looking also to the past questions here reported, but I didn't find a solution.

Problem: in VBA, how I can specify the name of a Excel table, inside an ADODB query, if I know only the name of the table (not its address range)?

I have to query some data of a given named table ("Table_1A"), stored in a given worksheet (named "1A") of an other closed workbook saved in resource data directory/folder of my PC.

It seems that ADODB is not able to get a connection to the specified table (it seems that Tables are invisible to ADODB).

Note: classical "hand made" table with the first column containing a set of materials and the other columns contains the phisical property of the material versus temperature (temperature value identify the column name). No pivot table or other table created quering databases.

A connection to a Table is only possible if I specify the sheet name plus the address range of the table. If I specify only the name of the Table ... it doesn't exist!

The problem is that the address range of the table to be queried, may change during the time (sheet name where the table is stored and updated, doesn't change along the time).

Thanks in advance for the help.

Ann

1
  • A table (ListObject) comes with a named range.
    – GSerg
    Commented 29 mins ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.