Use the connection property of either a pivotcache or querytable... a little sub like this will list them all for you:
Sub showconnections()
Dim pc As PivotCache
For Each pc In ActiveWorkbook.PivotCaches
Debug.Print pc.Connection
Next
Dim ws As Worksheet
Dim qt As QueryTable
For Each ws In ActiveWorkbook.Worksheets
For Each qt In ws.QueryTables
Debug.Print qt.Connection
Next qt
Next ws
End Sub
Good luck!
JR