Hi, I have this code that is working to create a cell with two colors in it, however I would like to use two different colors and whenever I try to change the colors the code breaks.
here is the two colors:
color 1 color 2
here is the code:
Sub Macro1()
'
' Macro1 Macro
'
With Selection.Interior
.Pattern = xlPatternLinearGradient
.Gradient.Degree = 90
.Gradient.ColorStops.Clear
End With
With Selection.Interior.Gradient.ColorStops.Add(0)
.ThemeColor = xlThemeColorDark1 'First Color
End With
With Selection.Interior.Gradient.ColorStops.Add(0.49)
.ThemeColor = xlThemeColorDark1 'First Color
End With
With Selection.Interior.Gradient.ColorStops.Add(0.51)
.ThemeColor = xlThemeColorAccent1 'Second Color
End With
With Selection.Interior.Gradient.ColorStops.Add(1)
.ThemeColor = xlThemeColorAccent1 'Second Color
End With
End Sub
Bookmarks