How to Set Excel 2007 Legend Format Properties in VBA

Using VBA code I need to set the following for the Legend on an Excel 2007 chart.
Legend Fill set to Gradient fill.
Shadow properties Transparency to 60%, Blur to 4 pts, Angle to 0 degrees, and Distance to 3 pts.
robtrueAsked:
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.

Harry LeeCommented:
Use the following code

    ActiveSheet.ChartObjects("Chart 1").Activate
    With ActiveChart.Legend.Format.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorAccent1
        .ForeColor.TintAndShade = 0.3399999738
        .ForeColor.Brightness = 0
        .BackColor.ObjectThemeColor = msoThemeColorAccent1
        .BackColor.TintAndShade = 0.7649999857
        .BackColor.Brightness = 0
        .TwoColorGradient msoGradientHorizontal, 1
    End With
    With ActiveChart.Legend.Format.Shadow
        .Type = msoShadow25
        .Visible = msoTrue
        .Style = msoShadowStyleOuterShadow
        .Blur = 4
        .OffsetX = 3
        .OffsetY = 0
        .RotateWithShape = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0.599999994
        .Size = 100
    End With

Open in new window

0
robtrueAuthor Commented:
Compile error: Method or member not found.
.ForeColor.Brightness = 0
.BackColor.Brightness = 0
Is there a another way to express brightness?
0
Harry LeeCommented:
Since you are not changing the Brightness, try delete both

.ForeColor.Brightness = 0

and

.BackColor.Brightness = 0.

That might be features only available in Excel 2010.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
robtrueAuthor Commented:
Solution directly on target and it works!!
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 Applications

From novice to tech pro — start learning today.