TeeChart Object Name in Excel

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

TeeChart Object Name in Excel

Post by dastrw » Wed Nov 07, 2007 1:13 am

I have inserted a TeeChart object into an Excel worksheet.

What is the object name? I looked everywhere for it.

All the examples just use TChart1, but where did they get this from?

It doesn't seem to be anywhere in the TeeChart Editor. And I can't get a properties box to come up when right-clicking on the TeeChart Object.

This is my first time programming with TeeChart. The examples all seem to work, but I don't know how they are working without explicitly naming the TeeChart object 'TChart1'.

Thanks for any help.

dastrw
Newbie
Newbie
Posts: 16
Joined: Wed Oct 31, 2007 12:00 am

Post by dastrw » Thu Nov 08, 2007 11:53 pm

If I put my Excel worksheet into Design Mode and then I select the TeeChart object, then the object name appears in the upper-left text field that normally shows the current range or defined name.

I can rename the object by typing over TChart1 to get something that makes more sense.

This is still kind of inconvenient, but OK. I can't seem to select the object unless it is in design mode.

I can't even pick it from the Drawing > Objects List.

The only way I can select the TeeChart object is programmatically.

This makes it a bit inconvenient for select the object to copy and paste it to other applications such as PowerPoint in order to present the charts at meetings.

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

Post by Pep » Fri Nov 09, 2007 12:22 pm

Hi,

yes, the aspect and properties of the object can be modified only when it's switched to design mode or via code.

But, once you have clicked over the "Design mode" button you can select the Chart, right click over it, do a Copy, and then paste into a powerpoint page, and it will keep its aspect. Copying in this way means that you will have to add the necesary code as you did into the Excel.

In case that you only want to show the chart into a PowerPoint as an image you always have the option to export the Chart to desired image type from the Chart editor or by code and load or paste it into the PowerPoint page.

Post Reply