Pivot Table Macros in VBA Won't Work.
Posted by Craig Tanner on February 12, 2001 8:56 PM
I have been unable to change the PivotItems or PivotFields using VBA. Even if I record the Macros and try to replay them I get an error message like:
"Unable to se the Visible property of the PivotItem class"
or
"Unable to get the PivotTables Property of the Worksheet class"
Any Ideas on how to get this to work? I'm using Excel 97.
An example of a portion of code that won't work is:
ActiveSheet.PivotTables("PivotTable4").PivotFields("Itemid").CurrentPage = "TN1846"
Thanks in advance.
Craig