Page 1 of 1

Programmatically add active TeeChart Object in Excel

Posted: Tue Nov 27, 2007 11:43 pm
by 15047194
The two Excel examples you have included do the following:
1) Work with an active TeeChart that has already been manually added
2) Programmatically add a passive TeeChart

Could you give me some sample code for programmatically adding an active TeeChart to an Excel worksheet?

I would like to be able to have the users use the Edit functions to modify the chart after the initial generation. I don't want to have to replicate all that editing functionality myself.

Thanks.

Posted: Mon Dec 03, 2007 8:35 am
by Pep
Hi,

you can use the ShowEditor function, as in the example included into the TeeChart Pro installation :

TeeChart Pro Inserted into Excel.xls

Private Sub TChart1_OnDblClick()
' Show Chart Editor
TChart1.ShowEditor
' Stop mouse from running Zoom event
TChart1.StopMouse
End Sub