butters149
New Member
- Joined
- Mar 21, 2018
- Messages
- 23
Hi everyone,
I have the below macro which is a conditional format for certain cells, that is part of a larger macro. I am just wondering if there is a way to also insert a toggle button via active X I am thinking to be able to turn this function on and off?? If so, what code should I add to my macro?
Thank-you,
Range("E2:J2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$J2>60"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("A1").Select
I have the below macro which is a conditional format for certain cells, that is part of a larger macro. I am just wondering if there is a way to also insert a toggle button via active X I am thinking to be able to turn this function on and off?? If so, what code should I add to my macro?
Thank-you,
Range("E2:J2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$J2>60"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("A1").Select