• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1323
  • Last Modified:


I've got VB5 Ent. I have a project that I was working on at another machine. I was using the Microsoft Common Controls - 5.0 (comctl32.ocx). When I try to open the project on this machine it says it can't load comctl32.ocx. It will allow me to add the ocx and add treeviews and such on forms but all of my existing controls are now PictureBoxes. I have seen this before and I normally just replace all of the controls and rename them but this is starting to be a big hassle, especially with the size of this particular project. Does anyone know of a way to get around this without having to add all of the controls and rename them again?

Did that make sense?

I've looked in the vbp file and the path to comctl32.ocx is right. I can open it fine on the old machine but not on this one..
1 Solution
Just copying the files from one machine to another is NOT sufficient. You have to register them. When you install VB, it registers all the controls at that time. If your project uses an unregistered control you'll get this error even if you can see the .OCX just fine.

Use REGSVR32 to register the OCX.


jmnolanAuthor Commented:
The control is registered. I installed VB5 on this machine. I can add listviews and treeviews and all of the other common controls to an empty form. I do not believe that this is a registration problem, as I have seen those before and this is something different.
jmnolanAuthor Commented:
Here is the exact message:

'\\..\..\..\comctl32.ocx' could not be loaded--Continue Loading Project?

I get this when I first open the project. The Common Controls are not in the toolbox as they should be. This always happens to me when I try to open an existing project with a new install of VB.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

The .VBP has a set of pointers in it to the files and their locations. It also contains the GUID's. If either doens't match, you'll get errors like this. Try manually editing so that path is correct and see if that helps.


i have gotten this before. somehow when a vb project is brought up on another machine, it "looses" some of the controls you've included. this is what i have discovered. when you load the project and you get one of these messages, note the offending ocx name. after the project is loaded, goto project/components and readd them. don't do anyting else to your project until this is done. after you've completed it, it "should" run as expected. if it does, save the project.

i have no idea why this occurs. its frustrating.

jmnolanAuthor Commented:

That didn't work. I know where you're coming from though. After I add the component back in and load a form, all of the listviews are gone.

Here is a little more information:

in the log file for a form:
Line 35: Class ComctlLib.ListView of control lvListView was not a loaded control class.

First two lines of the .frm file:
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "comctl32.ocx"

Line 35:
   Begin ComctlLib.ListView lvListView

If the GUID is incorrect, how do I go about getting the right one?

Your problem is that you have installed something which has overwritten COMCTL32.OCX version 5 with COMCTL32.OCX version 6, and it has probably overwritten COMDLG32.OCX and COMCT232.OCX also.
The easiest way to fix this is by installing VB6.

If that is not possible then do this:

1)Find the 3 files mentioned above from someones elses computer and make sure they are version 5, which you can check in the file properties

2)Delete the above 3 files out of your WINDOWS\SYSTEM directory.

3)Run Regclean.exe which you can download at MICROSOFT.COM

4)Reboot System

5)Copy the version 5 files back into the WINDOWS\SYSTEM directory

6)Run REGSVR32.EXE on the 3 files.

Messy but it does work.
jmnolanAuthor Commented:
comctl32.ocx version:  5.00.3714

I have seen this problem before VB6 was ever released...

COMDLG32.OCX and COMCT232.OCX are the same version too...
Is the same service pack installed on both machines?

When you copied the project over, did you copy the frx files or just the frm files. (I've done that before with sad results. ;-) )

In one of the support subdirectories on your VB5 installation CD, there is a .reg file that registers the  licenses for all of the controls. Double clicking on that file is worth a try.
This is very common problem. Here is a simple solution.
Even though error comes "\\..\..\..\comctl32.ocx' could not be loaded--Continue Loading Project? " load the project.

Then select comctl32.ocx in the Project->Components section and save the project. Here is the trick when save message comes up with all the forms list and vbp name, deselect all the forms and choose only vbp and press save.

Again open the project...No problem.

If you have still problem with the control. Use Regsvr32 to register this control first.
jmnolanAuthor Commented:

That's what I was looking for! Thanks!
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.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now