Solved

vba,locate pivot and thier names

Posted on 2013-11-06
3
214 Views
Last Modified: 2013-11-06
Hello All,

i am Dealing with a complex workbook with one sheet where there are several pivots (I am getting confused)  – is there a vba to know how many pivots are there in a worksheet  and their names?
Thank you
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
gowflow earned 500 total points
ID: 39628022
sure. This code will print in the debug window name of all pivot tables in the current sheet.

Sub test()
Dim WS As Worksheet
Dim Piv As PivotTable

Set WS = ActiveSheet
For Each Piv In WS.PivotTables
    Debug.Print Piv.Name
Next Piv

End Sub

Open in new window


gowflow
0
 

Author Closing Comment

by:Rayne
ID: 39628100
Awesome GowFlow
Thank you
0
 
LVL 30

Expert Comment

by:gowflow
ID: 39628168
Your welcome
gowflow
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question