My goal is to have code to set a dynamic range to the variable myRng and then set conditional formatting such that if A(i) =true then row(i) is Grey, Italic, and Strikethrough.
What I notice happening is that the conditional format formula becomes "$A1048535=TRUE"
It acts like there is a application variable that keeps counting up every time I run the script.
What I notice happening is that the conditional format formula becomes "$A1048535=TRUE"
It acts like there is a application variable that keeps counting up every time I run the script.
Code:
[COLOR=Blue]Sub[/COLOR] CreateConditionalFormat(senior [COLOR=Blue]As String[/COLOR])
[COLOR=SeaGreen]'
' CreateStrikeGreyCondition Macro
'[/COLOR]
[COLOR=Blue]Dim[/COLOR] myRng [COLOR=Blue]As[/COLOR] Range
[COLOR=Blue]Set[/COLOR] myRng = Sheets(senior).[B4].CurrentRegion
Cells.FormatConditions.Delete
[COLOR=Blue]With[/COLOR] myRng.FormatConditions _
.Add(xlExpression, xlExpression, "=$A5=True")
[COLOR=Blue]With[/COLOR] .Font
.Color = RGB(90, 90, 90)
.Italic = [COLOR=Blue]True[/COLOR]
.Strikethrough = [COLOR=Blue]True[/COLOR]
[COLOR=Blue]End With
End With
End Sub[/COLOR]