Hi,

I´m trying to change colour of shapes based on value from the ScrollBar.

I came up with this code which works but only for values that are not connected to ScrollBar (More precisely It works after reclicking to the cell but not right away after value from scrollbar changes).

Can anybody knows how to solve this please?


Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
If Target.Value < 100 Then
ActiveSheet.Shapes("Oval 1").Fill.ForeColor.RGB = vbRed
ElseIf Target.Value >= 100 And Target.Value < 200 Then
ActiveSheet.Shapes("Oval 1").Fill.ForeColor.RGB = vbYellow
Else
ActiveSheet.Shapes("Oval 1").Fill.ForeColor.RGB = vbGreen
End If
End If
End Sub


Thanks for any response!!