Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
nj nj is offline
external usenet poster
 
Posts: 9
Default Excel: How to generate a list of pivot tables in a file

I've for a TOC for the sheet and can use "Paste List" to get a list of
named ranges, but can someone point me towards the code for generating
a list of the pivot tables in a file?

I'm needing to go thru the file clean up the naming conventions and
then update the subroutines to use the updated names.

Something comparable to ActiveWorkbook.Sheets.Count, I guess?

Thanks,
Neva

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Excel: How to generate a list of pivot tables in a file

Sub ListPivotTables()
Dim PT As PivotTable
Dim Sh As Worksheet
Dim lSh As Worksheet 'Loop Sheet
Set Sh = Worksheets.Add
Sh.Range("A1") = "Pivot Table Name"
For Each lSh In ActiveWorkbook.Worksheets
For Each PT In lSh.PivotTables
Sh.Range("A" & Sh.Rows.Count).End(xlUp).Offset(1) = PT.Name
Next
Next
End Sub
--
Charles Chickering

"A good example is twice the value of good advice."


"nj" wrote:

I've for a TOC for the sheet and can use "Paste List" to get a list of
named ranges, but can someone point me towards the code for generating
a list of the pivot tables in a file?

I'm needing to go thru the file clean up the naming conventions and
then update the subroutines to use the updated names.

Something comparable to ActiveWorkbook.Sheets.Count, I guess?

Thanks,
Neva


  #3   Report Post  
Posted to microsoft.public.excel.programming
nj nj is offline
external usenet poster
 
Posts: 9
Default Excel: How to generate a list of pivot tables in a file

Perfect - thanks!

Reply
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
Building pivot tables in Excel 2007 based on existing pivot tables? [email protected] Excel Discussion (Misc queries) 4 December 26th 07 08:05 PM
How do I reduce an Excel with Pivot Tables file size? Marie Excel Discussion (Misc queries) 3 August 17th 07 10:53 PM
Large Excel file size, no pivot tables SP Excel Discussion (Misc queries) 1 April 20th 05 09:30 PM
How to generate a file copy of the Excel Find results list MrSpreadsheet Excel Programming 4 February 11th 05 07:07 AM
Pivot tables, Validation Lists exist in an excel file Shimmy Excel Programming 1 June 16th 04 01:45 AM


All times are GMT +1. The time now is 11:29 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"