![]() |
how to see a database name in a pivot table?
When opening ACCESS DB from Excel I have the problem that I can't see on
which DB its linked? Also I can't change de DB from Excel. Regards, Hiltjo. |
how to see a database name in a pivot table?
You can't change the DB. You can get the SQL commands and copy them to a new
liked DB. To get the SQL statements and the connection you can use this macro Sub GetConnection() RowCount = 1 For Each MyQuery In ActiveSheet.QueryTables 'Set MyQuery = ActiveSheet.QueryTables.Item(1) Sheets("Sheet2").Range("A" & RowCount) = MyQuery.Connection Sheets("Sheet2").Range("A" & RowCount) = MyQuery.Sql Next MyQuery End Sub "Johan" wrote: When opening ACCESS DB from Excel I have the problem that I can't see on which DB its linked? Also I can't change de DB from Excel. Regards, Hiltjo. |
All times are GMT +1. The time now is 04:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com