Solved

vba,locate pivot and thier names

Posted on 2013-11-06
3
213 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 29

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 29

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

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

756 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