HI All,
Not sure how to go about this. I have a pivot table in a worksheet. IF a user selects a page selection I need an an event to happen. The cell that this sits in is B4.
The code I have is:
Perhaps I think I am not using this correctly. Basically if the User changes cell B4 to the option "All", then I want the code to correct their selection so that "Total" instead is selected. If they choose anything else apart from "All" then nothing happens with the code. Does this make sense?
thanks in advance,
vaneagle
Not sure how to go about this. I have a pivot table in a worksheet. IF a user selects a page selection I need an an event to happen. The cell that this sits in is B4.
The code I have is:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.ActiveSheet.PivotTables("PivotTable9").PivotFields("Trading Dept").CurrentPage _
= "Total"
End Sub
Perhaps I think I am not using this correctly. Basically if the User changes cell B4 to the option "All", then I want the code to correct their selection so that "Total" instead is selected. If they choose anything else apart from "All" then nothing happens with the code. Does this make sense?
thanks in advance,
vaneagle