Consulting

Results 1 to 3 of 3

Thread: Pivot Table with ADO

  1. #1

    Smile Pivot Table with ADO

    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.

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You can use something like:
    [VBA] 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"
    [/VBA]
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    This is what I'm talking about. Many thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •