PDA

View Full Version : Pivot Table with ADO



joprotus
09-02-2007, 02:29 AM
How can I use an ADO connection string with pivot table? When I macro recorded the pivot table using outside source data, it used DAO.:thumb

rory
09-03-2007, 05:26 AM
You can use something like:
Dim pc As PivotCache
Set pc = ActiveWorkbook.PivotCaches.Add(xlExternal)
pc.Connection = "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test\db1.mdb"

joprotus
09-05-2007, 12:37 AM
This is what I'm talking about. Many thanks.