Manipulating MS Graph 8 chart ChartTitle in VBA 
Author Message
 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



Mon, 07 Aug 2000 03:00:00 GMT  
 Manipulating MS Graph 8 chart ChartTitle in VBA

Initialize the Graph title in the design mode, and put your code
(ChartTitle.Caption) first or last, not is important.

Sorry for my Bad English

Marco Granda
Lima-Peru



Tue, 08 Aug 2000 03:00:00 GMT  
 Manipulating MS Graph 8 chart ChartTitle in VBA

Good idea, but I still need to manipulate the graph title at run-time.  The
graph contains data based on the month/year selected by the user (via combo
boxes), and I change the chart title to reflect the month/year selected.

If they select a month/year with no data, the chart blanks out (this is
ok).  But if they follow up by selecting a month/year with data, the reset
of the title bombs (because the ChartTitle and HasTitle properties stay
read-only until the data update of the chart finishes).

Any ideas?

-Russ



Quote:
> Initialize the Graph title in the design mode, and put your code
> (ChartTitle.Caption) first or last, not is important.

> Sorry for my Bad English

> Marco Granda
> Lima-Peru




Tue, 08 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems updating MS Graph charts in Powerpoint using Excel VBA

2. Manipulating the MS Excel OLE Graph at run time behind the scenes

3. MS Word VBA with MS Graph

4. MS Word VBA with MS Graph

5. Closing datasheet after generating MS Graph chart

6. MS Graph 2000 Chart control

7. MS Graph / chart and VB4 16

8. MS-Chart graph with uneven x axis

9. How do i print the MS Chart (Graph) present on a VB form

10. Horizontal Bar graph with MS Chart Control?

11. MS GRAPH 97 Chart saved to GIF file

12. Can I use VBA to manipulate external MS-ACCESS database

 

 
Powered by phpBB® Forum Software