Excel + TeeChart 8 - "Cannot insert object"

TeeChart for ActiveX, COM and ASP
Post Reply
pam
Newbie
Newbie
Posts: 5
Joined: Mon Aug 11, 2008 12:00 am

Excel + TeeChart 8 - "Cannot insert object"

Post by pam » Wed Aug 20, 2008 5:56 am

While trying to insert TeeChart 8 ActiveX as an Object in Excel 2003, I get the message "Cannot insert object".

Some details - all apply to the computer specified below:

- This problem happens on one computer, where also TeeChart 6 ActiveX is installed (runtime only) - I don't know if this is the reason, but on other computers there is no TeeChart in older version. In fact, this is the developer's laptop...

- The installation was without error.
- The same situation is in all applications-ActiveX containers where you use "Insert Object" ie. MS Word, MS Excel, OSISoft PI ProcessBook
- In VB6 everything seems to be OK - loading TChart8 from VB Toolbar works.

- When I open an Excel document where I already embedded TChart8 on another computer, I see no error message, I can edit this TChart from VBA design-mode menu, but my TChart settings or changes are not saved in the document.
- strange - I can insert old TChart6 in Excel, even if it was runtime version. This TChart6 was never installed as developer version, it is part of some demo installed earlier.

It seems that the problem is computer specific, but I want to be sure that I know *why* it doesn't work - I want to avoid surprises later on another computers.

Is there any way to log/debug the component loading process, to identify problems? Or maybe to trace some registry conflicts?

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

Post by Pep » Wed Aug 20, 2008 9:37 am

Hi Pam,

The problem may lie with VBA's access method to ocxs. I'm not aware of
how that might relate to the particular VBA application that you are working with but applications in Microsoft Office that use VBA to access
ocx controls make a copy of the type library of the control (eg. in Excel they make .exd extension files. Typical location:

C:\Documents and Settings\YourUserName\Local Settings\Temp\Excel8.0

We have encountered version control problems in the past with these files (don't update with new versions). I don't say that for sure that the problem lies here but there may be a file handle issue related to this and VBA's access to these files and/or the ocx, for example perhaps tying up excessive file handles (and therefore releasing them when the app is closed and restarted).

pam
Newbie
Newbie
Posts: 5
Joined: Mon Aug 11, 2008 12:00 am

Bingo!

Post by pam » Wed Aug 20, 2008 9:56 am

Hi Josep,

It helped!
I renamed TeeChart.EXD and tried to insert the TChart8 and it works this way. The new version is immediately created as EXD.

The same works with other VBA application - I simply deleted/renamed existing TeeChart.EXD in the respective subfolder of the local Temp and it was replaced by the new version.

Thanks for the solution!

Pawel

CeuticalSoft
Newbie
Newbie
Posts: 3
Joined: Thu May 07, 2009 12:00 am
Contact:

Excel error

Post by CeuticalSoft » Thu May 07, 2009 3:09 pm

I had the same problem - cannot insert object onto Excel spreadsheet using v8 with v7 coexist. Deleting the TeeChart.exd file solved the problem.
Excel modules for Life Science Research

Post Reply