Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Missing reference ocx in excel although present

Posted on 2004-04-09
8
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 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