Would I have to run the macro all the time. I don't know much about VB. Bria
M mense23 Oct 15, 2004 #1 Would I have to run the macro all the time. I don't know much about VB. Bria
D Debra Dalgleish Oct 15, 2004 #2 You could use the PivotTableUpdate event to run it when the pivot table is refreshed. For example: '========================== Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) HideZeroRowTotals End Sub '=================== The HideZeroRowTotals code goes on a regular module and the PivotTableUpdate code goes on the module for the sheet that contains the pivot table. There are instructions here for pasting the code: http://www.contextures.com/xlvba01.html
You could use the PivotTableUpdate event to run it when the pivot table is refreshed. For example: '========================== Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) HideZeroRowTotals End Sub '=================== The HideZeroRowTotals code goes on a regular module and the PivotTableUpdate code goes on the module for the sheet that contains the pivot table. There are instructions here for pasting the code: http://www.contextures.com/xlvba01.html