Solved

Missing reference ocx in excel although present

Posted on 2004-04-09
8
269 Views
Last Modified: 2013-12-26
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?
0
Comment
Question by:storkpmtbox
  • 3
  • 3
8 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 10792268
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
 

Author Comment

by:storkpmtbox
ID: 10811013
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
 
LVL 18

Expert Comment

by:Sethi
ID: 10811129
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:storkpmtbox
ID: 10811606
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
 
LVL 18

Expert Comment

by:Sethi
ID: 10811821
That's what I told you. I am not sure how to do it from Excel :-)
0
 

Accepted Solution

by:
storkpmtbox earned 0 total points
ID: 10993748
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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now