Greetings, I am using the following code to change the colors in a autoshape. Depending on the value the shape changes colors, or is blank if the cell is blank. I am getting the "End With without With" error, and I am confused as to what I am doing wrong, I have a With and an End With statement there... - thank you for any help. RB
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$46" Then
'Change autoshape color to red depending upon cell value, or blank of no value is entered.
With ActiveSheet.Shapes("Rectangle 1").Fill.ForeColor
If Target.Value = "" Then
.SchemeColor = 1
Else
If Target.Value >= 1 And Target.Value <= 421 Then
.SchemeColor = 10
Else
If Target.Value >= 422 Then .SchemeColor = 50
End If
End With