Manipulating Charts with VBA
try DrawingObjects instead of ChartObjects, and see if that works.
Brian Murphy
"Colleyville Alan" wrote in message news:Z5lgc.16295$ru4.17030@attbi_s52...
"Rick" wrote in message
news:zhkgc.160673$K91.413926@attbi_s02...
Hi All,
When I try to use the code below to change some chart properties I get
various error like "
"Object doesn't support this method or property" (for the Refresh method)
or the one which I can't
recall at this moment but basically says that the property can't be
changed (regarding the
ChartTitle.Text property)
Sheet_6.ChartObjects(1).Visible = True
Sheet_6.ChartObjects(1).Chart.ChartTitle.Text = "Total Costs during Five
Years of Analysis"
Sheet_6.ChartObjects(1).Refresh
I am no expert, but from the Object Browser it appears that you are using
the wrong class for Chart.ChartTitle.Text
There are two classes listed, one singular and the other plural:
ChartObject
ChartObjects
The ChartTitle is a member of ChartObject, not ChartObjects
|