# In Excel 2010, Formatting the Chart Area with a gradient fill

How do I do this programatically?

The direction is linear at 90 degrees
Brightness and transparency are both 0%
RGB               Position
220,220,230            0%
102,102,153            3%
102,102,153            27%
204,204,255            50%
102,102,153            83%

Thanks!
John
LVL 1
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,

pls try
``````Sub Macro()

Dim oFill As FillFormat
Set oFill = ActiveSheet.Shapes("Chart 4").Fill
With oFill
.Color = RGB(220, 220, 230)
.Position = 0
.Transparency = 0
End With
.Color = RGB(102, 102, 153)
.Position = 0.03
.Transparency = 0
End With
.GradientStops.Insert RGB:=RGB(102, 102, 153), Position:=0.27, Transparency:=0
.GradientStops.Insert RGB:=RGB(204, 204, 255), Position:=0.5, Transparency:=0
.GradientStops.Insert RGB:=RGB(102, 102, 153), Position:=0.83, Transparency:=0
.Visible = msoTrue
End With
End Sub
``````
Regards
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Reliability Business Tools Analyst IIAuthor Commented:
Awesome, Rgonzo! If only everything were this perfect right out of the gate :- )

Thanks,
John
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.