Hello All,
I am trying to use a check-box macro named, "AGLFAqueRun" and I am using an If Else statement to use it. When checked, I want it to make a few cells white with black font and unlocked from protected. Then, when checked, the cell returns to it's original form: orange box with red font and some values that I have set. Posted below is the code I have, excluding the variables I have established. I am running Office 2010 with Windows 7.
Excel Code:
The bold and italicized portion is what the debugger highlights as blue when I run the code.
Thank you,
Popsicle
I am trying to use a check-box macro named, "AGLFAqueRun" and I am using an If Else statement to use it. When checked, I want it to make a few cells white with black font and unlocked from protected. Then, when checked, the cell returns to it's original form: orange box with red font and some values that I have set. Posted below is the code I have, excluding the variables I have established. I am running Office 2010 with Windows 7.
Excel Code:
Code:
If AGLFAqueRun = True Then
Max.Locked = False
Min.Locked = False
With Max
.NumberFormat = "0.00"
With Max.Interior
.ColorIndex = 1
With Max.Font
.Color = vbBlack
End With
With Min
.NumberFormat = "0.00"
With Min.Interior
.ColorIndex = 1
With Max.Font
.Color = vbBlack
End With
[I][B][COLOR=#000000] Else[/COLOR][/B][/I]
With Max.Interior
.ColorIndex = 46
With Max.Font
.Color = vbRed
End With
With Min.Interior
.ColorIndex = 46
With Min.Font
.Color = vbRed
End With
Bmax = TrueBmax
Bmin = TrueBmin
Cmax = TrueCmax
Cmin = TrueCmin
Dmax = TrueDmax
Dmin = TrueDmin
Emax = TrueEmax
Emin = TrueEmin
Max.Locked = True
Min.Locked = True
End If
End Sub
The bold and italicized portion is what the debugger highlights as blue when I run the code.
Thank you,
Popsicle