1

I am having weird problems with MSCOMCTL.OCX in VB6.

I think it might have been caused when I attempted to install some old software for communicating with an engraving machine. The install was only partially successful because of missing OCX files. The application was listed in program files though, but when it was loaded only some functionality worked.

When I next tried to open a VB6 project it displayed an error about not being able to load MSCOMCTL.OCX. VB6 was previous working without any issues. At first I thought that the engraving tools installation had corrupted some files so I reinstalled VB6 and Service Pack 6 but that didn't fix the issue. Instead the the error message said '' could not be loaded.

I went through the forum posts here VB6 IDE cannot load MSCOMCTL.OCX after update KB 2687323 and here Object Library Not Registered When Adding Windows Common Controls 6.0 but none of the solutions posted worked.

I managed to get the engraving software uninstalled, went through the installation of VB6 again (plus some playing around with re-registering dlls) and I managed to get a project to open. This project definitely has got Microsoft Window Common Controls 6 selected in the components. The problem is that this is the only project I can open. All other projects fail with the error '' could not be loaded. Even starting a new project gives the error '' could not be loaded when selecting Microsoft Windows Common Controls 6.

I've looked at the project files and the reference to MSCOMCTL.OCX in the project that works and the projects that don't are the same:

Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX

Could someone help me get VB6 working again? Does any one know why a single project can load MSCOMCTL.OCX without any problems but all other projects, including brand new projects, throw an error?

Edit: Strangely, so long after the original post, this question just got flagged for being a possible duplicate. In my comments to an answer below I specifically say that I tried the solution that is proposed in as an answer to that question but it did not work.

goodman
  • 127
  • 1
  • 4
  • 13
  • Possible duplicate of [VB6 IDE cannot load MSCOMCTL.OCX after update KB 2687323](https://stackoverflow.com/questions/11982719/vb6-ide-cannot-load-mscomctl-ocx-after-update-kb-2687323) – Carl Onager Jun 27 '18 at 08:59

2 Answers2

0

Are you sure the references are the same in the working project and the non working project? Try changing the reference to the following

Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX

Just changed 2.1 in your reference to 2.0. This works in my environment. Maybe that's the difference between the projects that work and the ones that don't. Small difference in the reference that would be easy to miss.

Marc
  • 973
  • 4
  • 13
  • Yes they are exactly the same. I tried changing the reference to 2.0 and 2.2 but both still gave error messages. – goodman May 13 '16 at 07:40
  • I've just looked at another broken project, that gave the error message '' could not be loaded, and the the reference for that is already 2.0. I just tried changing it to 2.1 and got the same error message. – goodman May 13 '16 at 07:43
0

I've managed to get VB6 working by performing a system restore to before the problem application was installed. I did actually try this before posting my question but I was having a separate issue getting system restore to work, it said it couldn't access a file and rolled back any changes.

goodman
  • 127
  • 1
  • 4
  • 13
  • If anyone is interested the solution to the system restore problem is [here](http://answers.microsoft.com/en-us/windows/forum/all/system-restore-does-not-work-and-returns-the/15dc4cd3-4974-425a-9cac-020c46e7ccef?auth=1). I had to do it in safe mode. – goodman May 13 '16 at 08:39