Gingertrees
Well-known Member
- Joined
- Sep 21, 2009
- Messages
- 697
In my macro, I utilize conditional formatting to create alternating rows of color. The powers that be have tired of the sage green I've been using. How do I easily change the color in the following piece of code? Say I want to change it to pink, and then later on I change my mind and want to set it to light blue.
I know I could just take a stab at changing numbers - but is there a better way? Maybe set these to HEX colors?
I know I could just take a stab at changing numbers - but is there a better way? Maybe set these to HEX colors?
Code:
Cells.Select Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(ROW(),2)=1"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599963377788629