Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
the following macro gets stuck where show below Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim sql As String Dim pc As PivotCache Dim pt As PivotTable con.Open "provider=microsoft.jet.oledb.4.0;" & _ "data source=C:\Users\M Varnendra\Desktop\VBA on Excel\Chapter 22\salesdb.mdb" sql = "select * from sales" Set pc = ActiveWorkbook.PivotCaches.Add(SourceType:=xlExter nal) Set pc.Recordset = rs '''''getting stuck here Worksheets.Add befo=Sheets(1) Set pt = ActiveSheet.PivotTables.Add(PivotCache:=pc, _ tabledestination:=Range("a1")) know about it? thank |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
guys
whats up rs.Open sql, con was missing. now its working "vavasoo" wrote: hi the following macro gets stuck where show below Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim sql As String Dim pc As PivotCache Dim pt As PivotTable con.Open "provider=microsoft.jet.oledb.4.0;" & _ "data source=C:\Users\M Varnendra\Desktop\VBA on Excel\Chapter 22\salesdb.mdb" sql = "select * from sales" Set pc = ActiveWorkbook.PivotCaches.Add(SourceType:=xlExter nal) Set pc.Recordset = rs '''''getting stuck here Worksheets.Add befo=Sheets(1) Set pt = ActiveSheet.PivotTables.Add(PivotCache:=pc, _ tabledestination:=Range("a1")) know about it? thank |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Connection of Excel 07 pivot table to Access Query makes DB read o | Excel Discussion (Misc queries) | |||
Pivot Table connection String | Excel Programming | |||
Pivot table access - Connection | Excel Programming | |||
Pivot Table Data Connection | Excel Programming | |||
Pivot Table Connection | Excel Programming |