Spartan920
New Member
- Joined
- Sep 14, 2012
- Messages
- 9
I need help combining these 4 Private Sub Worksheet Changes:
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "A1" Then<o></o>
WithSheets("Dashboard").Shapes("Oval 1").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "B12" Then<o></o>
WithSheets("Dashboard").Shapes("Rectangle 111").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "R11" Then<o></o>
WithSheets("Dashboard").Shapes("Rounded Rectangle 3").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "P24" Then<o></o>
WithSheets("Dashboard").Shapes("Isosceles Triangle 2").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Any help would be most appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "A1" Then<o></o>
WithSheets("Dashboard").Shapes("Oval 1").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "B12" Then<o></o>
WithSheets("Dashboard").Shapes("Rectangle 111").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "R11" Then<o></o>
WithSheets("Dashboard").Shapes("Rounded Rectangle 3").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)<o></o>
IfTarget.Address(0, 0) = "P24" Then<o></o>
WithSheets("Dashboard").Shapes("Isosceles Triangle 2").Fill.ForeColor<o></o>
SelectCase UCase(Target.Value)<o></o>
Case"RED": .RGB = vbRed<o></o>
Case "YELLOW": .RGB = RGB(255, 255,109)<o></o>
Case"GREEN": .RGB = RGB(41, 247, 46)<o></o>
Case"GREY": .RGB = RGB(127, 127, 127)<o></o>
End Select<o></o>
End With<o></o>
End If<o></o>
End Sub
Any help would be most appreciated!