Link to home
Start Free TrialLog in
Avatar of storkpmtbox
storkpmtbox

asked on

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?
Avatar of Sethi
Sethi
Flag of India image

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.
Avatar of storkpmtbox
storkpmtbox

ASKER

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.
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.
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.
That's what I told you. I am not sure how to do it from Excel :-)
ASKER CERTIFIED SOLUTION
Avatar of storkpmtbox
storkpmtbox

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial