SV18
Board Regular
- Joined
- Sep 1, 2008
- Messages
- 157
...I have the following code that I'm trying to run when the pivot filter is changed, for some reason I can't get any of the target.adress commands to work properly
Private Sub Worksheet_Change(ByVal Target As Range)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
'This code changes the text of D21 dependant on what has been selected in the team dropdowm<o></o>
<o> </o>
If ActiveSheet.PivotTables("PivotTable2").PivotFields("Team").PivotItems("Unknown/Diligenta?").Visible = True Then<o></o>
Range("d21").Value = "*This data includes Diligenta serviced workitems, please use the drop down to deselect"<o></o>
Else<o></o>
Range("d21").Value = "*This data excludes Diligenta serviced workitems, please use the drop down to select"<o></o>
MsgBox "Sam, sort it out"<o></o>
End If<o></o>
<o> </o>
End Sub<o></o>
Private Sub Worksheet_Change(ByVal Target As Range)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
'This code changes the text of D21 dependant on what has been selected in the team dropdowm<o></o>
<o> </o>
If ActiveSheet.PivotTables("PivotTable2").PivotFields("Team").PivotItems("Unknown/Diligenta?").Visible = True Then<o></o>
Range("d21").Value = "*This data includes Diligenta serviced workitems, please use the drop down to deselect"<o></o>
Else<o></o>
Range("d21").Value = "*This data excludes Diligenta serviced workitems, please use the drop down to select"<o></o>
MsgBox "Sam, sort it out"<o></o>
End If<o></o>
<o> </o>
End Sub<o></o>