• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

vba,locate pivot and thier names

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
Rayne
Asked:
Rayne
  • 2
1 Solution
 
gowflowCommented:
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
 
RayneAuthor Commented:
Awesome GowFlow
Thank you
0
 
gowflowCommented:
Your welcome
gowflow
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now