
Manipulating MS Graph 8 chart ChartTitle in VBA
In trying to manipulate an Microsoft Graph 8 chart's ChartTitle property (in
VBA, Access 97) I've run into a snag. Maybe you can help.
Sometimes there are cases where my program is putting data into a chart that
was previously empty. When the chart is empty, the ChartTitle AND HasTitle
properties of the chart are read-only, apparently by design. The properties
become writable when new data is put into the datasheet chart AND the chart
updates to show the data.
In my program, the data for the chart is filled in first, and
HasTitle/ChartTitle are manipulated immediately after-- in terms of the
code. However, what happens at runtime is that the data *starts* to update,
and before the chart is refreshed (showing the data) the program attempts to
update the HasTitle and ChartTitle properties. Because the chart hasn't
refreshed yet, the program thinks there's no data in the chart, and the
attempt to write to the HasTitle and ChartTitle properties fails.
To get things to work all I have to do is wait until the data update has
caused the chart to refresh before I diddle the HasTitle and ChartTitle
properties. However, I can't seem to find a programmatical way to do this.
Any ideas?
Thanks!
--
Russ Washington