PDA

View Full Version : [SOLVED] Have I got the wrong documentation?



Mister_joe
12-19-2013, 05:10 AM
Hello everyone,
Here is a code snippet from the Excel macro book I am reading:

'Create a gradient pattern in the chart area, changing from red at the top to violet at the bottom
With ActiveChart.ChartArea.Fill
.Visible = True
.ForeColor.SchemeColor = 3
.BackColor.SchemeColor = 7
.TwoColorGradient Style:=msoGradientHorizontal, Variant:=1
End With

The code runs as expected. I am using Excel 2007. However, when I look through the documentation, I cannot see the Fill method amongst the members of the ChartArea object. I am now wondering if I have an incomplete documentation in my computer. The members of the ChartArea object available in the documentation in my computer are shown below:
10980

If it is the case that I have an incomplete documentation, please recommend where to get the full documentation.
Thanks.

Beavisx
12-19-2013, 05:34 AM
If you go to delevoper and then you open "Visual Basic" , if you click F2 you can acces to the object browser of VBA.
I found "fill". it is a proprety of the ChartFormat class

Have a look

Hope is that you were looking for

Aflatoon
12-19-2013, 05:57 AM
The Fill property of the ChartArea object is deprecated. It's hidden but still works. In theory you are supposed to use Chartarea.Format.Fill instead.

Mister_joe
12-19-2013, 06:34 AM
Thanks Beavisx and Aflatoon.