aravindhan_3
02-18-2016, 08:45 PM
Hi,
I need a help to have a check box to add or remove a one fields in pivot table
I have recorded this code to add the fields in pivot talbe
ActiveSheet.PivotTables("PivotTable67").AddDataField ActiveSheet.PivotTables( _
"PivotTable67").PivotFields("Market Base Pay - Avg by TS/CL"), _
"Count of Market Base Pay - Avg by TS/CL", xlCount
With ActiveSheet.PivotTables("PivotTable67").PivotFields( _
"Count of Market Base Pay - Avg by TS/CL")
.Caption = " Market Base Pay - Avg by TS/CL"
.Function = xlAverage
.NumberFormat = "#,##0"
I need to have a checkbox in another sheet, if I tick the box, this field should be added, and if I untick this fields should be removed
can someone help me which checkbox should I use with what code?
Thanks for your help in advance.
Regards
Arvind
cross post : http://www.mrexcel.com/forum/excel-questions/922554-visual-basic-applications-checkbox-add-remove-fields-pivot.html#post4434619
I need a help to have a check box to add or remove a one fields in pivot table
I have recorded this code to add the fields in pivot talbe
ActiveSheet.PivotTables("PivotTable67").AddDataField ActiveSheet.PivotTables( _
"PivotTable67").PivotFields("Market Base Pay - Avg by TS/CL"), _
"Count of Market Base Pay - Avg by TS/CL", xlCount
With ActiveSheet.PivotTables("PivotTable67").PivotFields( _
"Count of Market Base Pay - Avg by TS/CL")
.Caption = " Market Base Pay - Avg by TS/CL"
.Function = xlAverage
.NumberFormat = "#,##0"
I need to have a checkbox in another sheet, if I tick the box, this field should be added, and if I untick this fields should be removed
can someone help me which checkbox should I use with what code?
Thanks for your help in advance.
Regards
Arvind
cross post : http://www.mrexcel.com/forum/excel-questions/922554-visual-basic-applications-checkbox-add-remove-fields-pivot.html#post4434619