Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vba,locate pivot and thier names

Posted on 2013-11-06
3
Medium Priority
?
222 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 31

Accepted Solution

by:
gowflow earned 2000 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 31

Expert Comment

by:gowflow
ID: 39628168
Your welcome
gowflow
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

722 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