follow my question:
I have a project in which I need some shapes to receive conditional formatting based on named cell values.
For this I followed the following reasoning:
I recorded a Macro to identify the encoding of the attribute I would like to change, after that I made its change inside the VBA editor by inserting the IF function and informing the desired formatting conditions.
However, when I run this macro the changes are not applied.
When following the execution of the line-by-line code, I noticed that the lines referring to the formatting of the attribute in question were being skipped. So I made a correction to the indentation, but even so the changes are not being applied. Would anyone have any idea how to solve?
    Sub Condiciona_Icon()
' ---------------------------- FORMATAÇÃO CONDICIONAL DE ÍCONE ------------
'
Sheets("Início").Select
    Range("A14").Select
    ActiveSheet.Shapes.Range(Array("IconEtp1")).Select
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        If CP_1 = "Atrasado" Then
        .ForeColor.RGB = RGB(255, 0, 0)
        ElseIf CP_1 = "Regular" Then
        .ForeColor.RGB = RGB(146, 208, 80)
        End If
        .Transparency = 0
        .Solid
    End With
End Sub
 
    