Private Sub Worksheet_Change(ByVal Target As Range)
'Updateby Extendoffice 20160704
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
If Target.Value < 100 Then
ActiveSheet.Shapes("srRectangle1").Fill.ForeColor.RGB = vbRed
ElseIf Target.Value >= 100 And Target.Value < 200 Then
ActiveSheet.Shapes("srRectangle1").Fill.ForeColor.RGB = vbYellow
Else
ActiveSheet.Shapes("srRectangle1").Fill.ForeColor.RGB = vbGreen
End If
End If
End Sub
Hi All
I found the above code online which nearly suits my purpose, but I want to adapt the following line to something like
ActiveSheet.Shapes("srRectangle1").Fill.ForeColor = RGB(255, 0, 0)
But this doesn't work, can anyone tell me how I can use any RGB code for the colour rather than just the stand vb colours?
Thx in advance!
Bookmarks