Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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