I recorded a macro to hide the contents of a range based on the value of another cell. When I try to run it, I get an error at the ExecuteExcel4Macro line.
Columns("F:F").Select
Selection.NumberFormat = ";;;"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$A1=11"
Selection.FormatConditions(Selection.FormatConditions.count).SetFirstPriority
ExecuteExcel4Macro "(2,1,"";;;"")"
Selection.FormatConditions(1).StopIfTrue = False
End Sub
Thanks in advance.
Columns("F:F").Select
Selection.NumberFormat = ";;;"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$A1=11"
Selection.FormatConditions(Selection.FormatConditions.count).SetFirstPriority
ExecuteExcel4Macro "(2,1,"";;;"")"
Selection.FormatConditions(1).StopIfTrue = False
End Sub
Thanks in advance.