Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 2003. I have a PivotChart with 3 Field Buttons. I want the
user to be able to work with one of the field buttons and I want disable (and preferably make invisible) the other 2 field buttons. I suspect I may have to do this through VBA, but haven't been able to find a way to do this yet. I haven't been able to figure out how to reference the field buttons within VBA either. I am pre-novice in regards to VBA so I really need the "for dummies" version (please, be gentle). |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can disable the field button on a pivot chart by disabling
the itemselection property of the field in the underlying pivot table. This can be accomplished with code similar to what follows. Hiding the button on the pivot chart is a different matter. I don't know how to hide one button without hiding all. Sub DisablePivotField() Dim wks As String Dim pvt As String Dim fld As String wks = "2007Pivot" pvt = "PivotTable2" fld = "BusUnit" Worksheets(wks).PivotTables(pvt).PivotFields(fld). EnableItemSelection = False End Sub Luck to you. "gmead7" wrote: I am using Excel 2003. I have a PivotChart with 3 Field Buttons. I want the user to be able to work with one of the field buttons and I want disable (and preferably make invisible) the other 2 field buttons. I suspect I may have to do this through VBA, but haven't been able to find a way to do this yet. I haven't been able to figure out how to reference the field buttons within VBA either. I am pre-novice in regards to VBA so I really need the "for dummies" version (please, be gentle). |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom - this was very helpful.
"TomPl" wrote: You can disable the field button on a pivot chart by disabling the itemselection property of the field in the underlying pivot table. This can be accomplished with code similar to what follows. Hiding the button on the pivot chart is a different matter. I don't know how to hide one button without hiding all. Sub DisablePivotField() Dim wks As String Dim pvt As String Dim fld As String wks = "2007Pivot" pvt = "PivotTable2" fld = "BusUnit" Worksheets(wks).PivotTables(pvt).PivotFields(fld). EnableItemSelection = False End Sub Luck to you. "gmead7" wrote: I am using Excel 2003. I have a PivotChart with 3 Field Buttons. I want the user to be able to work with one of the field buttons and I want disable (and preferably make invisible) the other 2 field buttons. I suspect I may have to do this through VBA, but haven't been able to find a way to do this yet. I haven't been able to figure out how to reference the field buttons within VBA either. I am pre-novice in regards to VBA so I really need the "for dummies" version (please, be gentle). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where did the "Hide PivotChart field buttons" function go in 2007? | Excel Discussion (Misc queries) | |||
Create a total field for a pivot table/pivotchart | Excel Discussion (Misc queries) | |||
pivot chart is it possible to hide individual field buttons? Layout Field buttons | Charts and Charting in Excel | |||
Excel Pivot chart - Scales of multiple field buttons | Excel Discussion (Misc queries) | |||
PivotChart Data Field - can it be value? | Charts and Charting in Excel |