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: 109
Default Pivot Table..getting a list of all, sourec odata and sheets locate

Can some one help me determine the sheet name that each pivot table is located

I'm using the code below

thanks

Sub ListPivotTablesNSource()
Dim PT As PivotTable
Dim Sh As Worksheet
Dim lSh As Worksheet 'Loop Sheet
Set Sh = Worksheets.Add
Sh.Range("A1") = "Pivot Table Name"
Sh.Range("B1") = "Pivot Table Source"
Sh.Range("C1") = "Pivot Table Location"
For Each lSh In ActiveWorkbook.Worksheets
For Each PT In lSh.PivotTables
With Sh.Range("A" & Sh.Rows.Count).End(xlUp)
.Offset(1, 0) = PT.Name
.Offset(1, 1) = PT.SourceData
End With
Next
Next

Columns("A:B").EntireColumn.AutoFit
End Sub


--
Helping Is always a good thing
 
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 from multiple sheets? cware Excel Discussion (Misc queries) 12 December 29th 09 09:40 PM
Pivot Table with Multiple sheets Dynamite Excel Worksheet Functions 3 October 29th 08 03:27 PM
suppress warning and locate cube in a pivot table from olap cube Tewari Excel Discussion (Misc queries) 0 March 28th 07 06:54 AM
pivot table to sheets Emom Excel Worksheet Functions 5 August 25th 05 12:22 AM
multiple sheets into 1 pivot table scottwilsonx[_44_] Excel Programming 1 September 28th 04 06:50 PM


All times are GMT +1. The time now is 12:53 PM.

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"