LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Pivot Table sourcedata string truncation

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table with a variable range in the sourcedata field [email protected] Excel Discussion (Misc queries) 2 January 31st 07 12:11 AM
SourceData in pivot table JIM.H.[_2_] Excel Programming 0 June 9th 04 12:59 AM
Reling Pivot sourcedata to network drive MattShoreson[_13_] Excel Programming 0 May 4th 04 01:38 PM
Dynamic Array as pivot table SourceData..? Robert Stober Excel Programming 0 October 3rd 03 05:36 PM
string truncation ljorn Excel Programming 0 September 11th 03 02:23 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"