Solved

Unreferencing an OCX in XL2000

Posted on 2002-04-30
7
502 Views
Last Modified: 2012-05-04
I have a template in Excel that is apparently referencing an ocx (sqaote32.ocx-Rational ActiveX Test).  I use the Package and Deployment wizard to create an installation for the template.  The Setup.LST file that is generated does not refer to the component that is giving me problems.  However, when I try and run the install I get the following error: "Component 'sqaote32.ocx' or one of it's dependencies not correctly registered: a file is missing or invalid."

I have checked all the obvious locations in the VBA code and cannot find any references to the component.

Pleae Help.

Samir
0
Comment
Question by:samird
  • 4
  • 3
7 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 500 total points
ID: 6981417
Hi Samir,

you said > checked all the obvious locations in the VBA

this means also for all components in the workbook?, it could be that one the add-inn is referenceing to the ocx you can look them up in the tools | references menu

it could be another ocx/dll referencing the ocx that gives the error maybe that is included in your project but still references to the old one

if nothing else will do i would create a clean workbook
-move all the components to it
-move all sheets to it, be sure to change the links if you would go this way

btw what would happen if you just included the ocx in your project? version conflicts or not if it doesn't hurt you could try that instead of creating a copy

i'm almost sure it's in one of the included elements and they're referencing one or the other way still to this one, but if you can't find it i would create a copy instead of looking a day or more for some reference

concluding
-look into the othere elements (addins,ocx,dll,xla)
-or create a clean copy without any history
-or include the ocx

:O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6982748
if above doesn't help or you want to try something else

you can try to remove the reference programmatically, with

  With ThisWorkbook.VBProject
    .References.Remove .References("MSACAL")
  End With

you can also check the presence of the reference, you could use code like the following

  On Error Resume Next
  Set ref = Application.ThisWorkbook.VBProject.References("MSACAL")
  On Error GoTo Error_ReferenceFromFile
  If ref Is Nothing Then
    msgbox "No reference found"
  End If

this is only to solve your problem the code can be taken out when it is solved

HTH:O)Bruintje
0
 

Author Comment

by:samird
ID: 6983463
I added the code that you suggested.  I have a couple of questions.  What is "MSACAL"?  Is this a reference to a component that your code is looking for?  I get a "Subscript out of range" error using when I specify "MSACAL".  If I don't specifiy anything and perform a watch on "ref" it shows me the default VBA and office references.  I can't see the reference that I think is causing me problems.

samir
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 44

Expert Comment

by:bruintje
ID: 6983560
sorry "MSACAL" was just the sample, it should be "sqaote32"
0
 

Author Comment

by:samird
ID: 6984029
I substituted "sqaote32" instead but I still get the "Subscript out of range" error.  I tried using "FM20" (fm20.dll) which is the MS Forms dll and is also selected as a reference in the reference list, and I get the same error.  Any clues?

samir
0
 

Author Comment

by:samird
ID: 6988924
Brian,

Thanks for your help.  I thought I would go ahead and give you the points.  I called Microsoft and after a 3 hour call with them, I ultimately started over as you recommended.  They could not figure out any way to determine what hidden references may lurking around in my spreadsheet.  I had to tell them about your code snipet.  Good thing I had a support incident left.  Anyway, thanks for the help.

Samir
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6991610
Samir, sorry to hear you had to start over, you had to tell them about that snippet? that's funny think they would come up with some of their own

Good luck
Brian
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction It seems that at least a couple of times per month, I answer a question that requires automating Outlook from another Microsoft Office application, usually (although not always) to send one or more email messages.  For example: …
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

22 Experts available now in Live!

Get 1:1 Help Now