Murray Brown
asked on
Excel VBA Change color of gradient fill
Hi
I use the following code to add a two color gradient fill to the chart.
The color is maroon. How would I alter the code to use blue instead.
I used the macro recorder and the code seemed to be all the same.
What governs the color of the fill
Sub Macro2()
'
' Macro2 Macro
With ActiveSheet.Shapes("Chart 1").Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColo r = msoThemeColorAccent1
.ForeColor.TintAndShade = 0.3399999738
.ForeColor.Brightness = 0
.BackColor.ObjectThemeColo r = msoThemeColorAccent1
.BackColor.TintAndShade = 0.7649999857
.BackColor.Brightness = 0
.TwoColorGradient msoGradientVertical, 2
.RotateWithObject = msoTrue
End With
End Sub
I use the following code to add a two color gradient fill to the chart.
The color is maroon. How would I alter the code to use blue instead.
I used the macro recorder and the code seemed to be all the same.
What governs the color of the fill
Sub Macro2()
'
' Macro2 Macro
With ActiveSheet.Shapes("Chart 1").Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColo
.ForeColor.TintAndShade = 0.3399999738
.ForeColor.Brightness = 0
.BackColor.ObjectThemeColo
.BackColor.TintAndShade = 0.7649999857
.BackColor.Brightness = 0
.TwoColorGradient msoGradientVertical, 2
.RotateWithObject = msoTrue
End With
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER