Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: Error Occurs With Macro Making a Pivot Field Visible
Hi All,
In code is the following line: Sheets("Pivot").PivotTables("PivotTable3").PivotFi elds("AS_AT").PivotItems(lastDay).Visible = True Where lastday is a string of the last day of the previous month and is a valid pivot table field - when recorded the macro actually records the above line except the car lastday is the actual name. However, every time this code is run an error occurs - Run Time Error 1004: Unable to get the PivotItems property of the PivotField class. Even when reocrding and re-running the recorded macro the same error occurs, which is bizarre seeming excel provided the code itself. This is in Excel 2007. If anybody is able to assist fix or work around this error, it would be greatly appreciated. Thank you in advance. Regards, Clint |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|