Programmatically add active TeeChart Object in Excel

TeeChart for ActiveX, COM and ASP
Post Reply
dastrw
Newbie
Newbie
Posts: 16
Joined: Wed Oct 31, 2007 12:00 am

Programmatically add active TeeChart Object in Excel

Post by dastrw » Tue Nov 27, 2007 11:43 pm

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.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Dec 03, 2007 8:35 am

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

Post Reply