Missing reference ocx in excel although present

We developped an ActiveX component in VB 6 to be used in Excel (2000 and XP). It gets some data from a small server component and puts it in a worksheet. This OCX gets installed onto Win2000 and WinXp machines.

The problem:

If I install the OCX onto machine x, y ,z it works fine, if I install the OCX onto machine a, b, c and open the same Excel sheet that I use on machine x, y, z (over the network) they are no longer working (the ocx object can be seen on the Xl sheet but Xl seems to look at it as where it a picturebox). I found that Excel reports the reference to this OCX 'MISSING' although I just installed it.

At this point the only option I have to get this sheet to work is to totaly recreate the workbook, put the OCX in there and save it. When this is done the workbook works on ALL the machines (a, b, c, x, y, z).

I think the only way to solve this issue is to try to understand how Excel saves the OCX information to the file. Or maybe someone can explain to me if there are some options that I need to set in my VB 6 project to prevent these problems.

Main question is: How is this possible and how do I prevent this from happening?
storkpmtboxAsked:
Who is Participating?
 
storkpmtboxConnect With a Mentor Author Commented:
I must say: I am a bit disappointed

For me this problem was pretty important and thus I did not stop looking for a solution........ and I found it. Here we go:

Like I stated before in this question: it had something to do with CLSID's and version numbers.

It seemed that some of the PC's used where using a NEWER version of the OCX than the others (this was an officialy unreleased development version). The result was that any Excel sheet created on a PC with this higher version number would not work on other machines but the other way aroud it would work!

Thus the solution was:
- uninstall everything regarding the OCX
- use regfixer to be sure every peace of registry crap is deleted
- Install the right version (lower version)
- Recreate the Excel sheets with the OCX components (or clean up the existing sheet by deleting the OCX objects, the references and recreating them)
- Make sure you DON'T have any excel [OCX object name].EXD files hanging around on the PC (delete them)
- everybody's happy :-)

I found al the information I needed on the internet (unfortunately not at Experts Exchange). The tools I used to determine the versionnumbers installed on the PC and the version numbers used by Excel are:
- Microsoft's OLEVIEW (search for OLEVIEW.EXE on the download site)
- The DocFileViewer from Andre .v.d. Merwe at: http://users.iafrica.com/d/da/dart/zen/Source/ByLang/Delphi/DocFileUtils/DocFileViewer/df__DocFileViewer.html

Seems I've become an expert myselve ;-)
0
 
SethiCommented:
The Excel object you reference in your VB project is directly related to the Excel that is installed on your machine. Example: if you have Excel XP installed on your machine then the Excel library that will be flashed will be 10. However, if you try to run the VB project file on a machine that has another Excel version installed you will see that error, becuase VB tries to look for 10.0 version of Excel.
0
 
storkpmtboxAuthor Commented:
Sorry for not being clear,

The OCX is reported missing IN Excel. I am referencing an (self made) object from Excel. I am NOT referencing an Excel object from my VB project.

One thing that would help me to debug the problem is some kind of tool to look inside the Excel sheet and see how my OCX is referenced (which CLSID's etc.) and some tool to see how my OCX is registered on a particular PC.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
SethiCommented:
I am not sure how to do this but this is what I can see: Go to Add Ins and pres Automation...see if something there helps.
0
 
storkpmtboxAuthor Commented:
This option is only available in Excel XP and newer not in Excel 2000.

But I fail to see the point on looking at a list of available components on a PC because the ActiveX component that I am using IS available, Excel just does not seem to be able to find that object although it is listed! Like I said it probably has something to do with CLSID's and perhaps version numbers but I can not check this because I can not look inside the Xl sheet.
0
 
SethiCommented:
That's what I told you. I am not sure how to do it from Excel :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.