jim.thornton
06-15-2009, 08:49 PM
I'm trying to show the details of a field within a Pivot Table. For some reason, the following code is resulting in Error 1004.
Sub Volume_OpenBreakdown()
'
' Volume_OpenBreakdown Macro
'
'
Range("D7").Select
ActiveSheet.PivotTables("Volume").PivotFields("Agent").ShowDetail = Not ActiveSheet.PivotTables("Volume").PivotFields("Agent").ShowDetail
End Sub
Can anyone here tell me why it isn't working? I'm trying to set it up so that I can add a button and assign this macro to open/close the details. I would rather have one button rather than two (open and close).
Any help is greatly appreciated.
Sub Volume_OpenBreakdown()
'
' Volume_OpenBreakdown Macro
'
'
Range("D7").Select
ActiveSheet.PivotTables("Volume").PivotFields("Agent").ShowDetail = Not ActiveSheet.PivotTables("Volume").PivotFields("Agent").ShowDetail
End Sub
Can anyone here tell me why it isn't working? I'm trying to set it up so that I can add a button and assign this macro to open/close the details. I would rather have one button rather than two (open and close).
Any help is greatly appreciated.