I have code to select pivot names under each worksheet. I'd like to find out how to get the data connection name for each pivot tables.
Dim ws As Worksheet
Dim pvt As PivotTable
Dim pvf As PivotField
Dim pvi As PivotItem
Dim x As String
Dim conn As WorkbookConnection
Application.ScreenUpdating = False
Worksheets("Log").Activate
Columns("H:L").Select
i = 1
For Each ws In ActiveWorkbook.Worksheets
If ws.PivotTables.Count > 0 Then
For Each pvt In ws.PivotTables
ActiveCell.Offset(i, 0) = ws.Name
ActiveCell.Offset(i, 1) = pvt.Name
'ActiveCell.Offset(i, 2) = conn.Name
i = i + 1
Next pvt
End If
Next ws