Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Determine if Pivot Table is Active using VbScript?

Hi all,

How can I determine if a pivot table is active in the document using vbscript?

My end users need to expand/collapse all the fields in different pivot tables with just the click of a button.

Example:

Sub ExpandPivot()

SET Pivot = ActiveDocument.GetSheetObject(“X”)

SET pvt = Pivot.GetProperties

SET Pivot2 = ActiveDocument.GetSheetObject(“Y”)

SET pvt2 = Pivot.GetProperties

If pvt.IsActive then

                ‘Perform Action 1

Else

                ‘Perform Action 2

End if

End sub

Thanks for your assistance.

0 Replies