Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have code to get the connection string on a pivot table called PivotTable1.
The strange thing is that the connection strings gets truncated. It only happens to the connection string that has something like "DriverId=25;Exclusive=0;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeo" <trucation occured here Now I havent tried to see if the connection still worked (if I piece it back to an array).... -- code-- Sub Get_PT_DbConnection() Dim oPivotTable As PivotTable Dim sPvTSrcData As String Dim i As Long Set oPivotTable = ActiveSheet.PivotTables("PivotTable1") oPivotTable.PivotCache.Refresh For i = LBound(oPivotTable.SourceData) To UBound(oPivotTable.SourceData) sPvTSrcData = sPvTSrcData & oPivotTable.SourceData(i) ' Change database connection string Debug.Print i & " : " & oPivotTable.SourceData(i) & vbCr Next i Debug.Print "Sourcedata:" & sPvTSrcData End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot table with a variable range in the sourcedata field | Excel Discussion (Misc queries) | |||
SourceData in pivot table | Excel Programming | |||
Reling Pivot sourcedata to network drive | Excel Programming | |||
Dynamic Array as pivot table SourceData..? | Excel Programming | |||
string truncation | Excel Programming |