4

This error is from a machine compiling a vb6 dll which suddenly stopped working and used to work fine.

I've seen this on the net a lot the solutions that i could find and were relevant to me. Including these ones which seemed promising from http://www.xtremevbtalk.com/archive/index.php/t-140158.html and one from http://www.excelfox.com/forum/f2/missing-mscomctllib-15/

Both of these suggested re-registering the MSCOMCTL.OCX

But after following both of these I still had the problem. After hours of searching and trying different things I realised that there were some updates which had been installed and waiting a reboot of the machine because of corporate policy.

The Answer

I rebooted the machine and waited for the updates to finish installing. After that the dll compiled without a problem.

Matt Vukomanovic
  • 1,392
  • 1
  • 15
  • 23

4 Answers4

13

I was having the same issue after installing some Windows updates (including upgrading to IE10), and VS2012 Update 3, but the updates were fully installed, and MSCOMCTL.OCX was already COM-registered. On an other StackOverflow post I found about this issue, this finally resolved it for me:

Run a command prompt as Admin

Navigate to C:\Windows\SysWOW64 on 64-bit systems, or C:\Windows\system32 on 32-bit systems

Execute 'regtlib msdatsrc.tlb' (without quotes)

Credit goes to 'Auto': VB6 IDE cannot load MSCOMCTL.OCX after update KB 2687323

I'm posting here since you're the first result when searching for this error.

Community
  • 1
  • 1
anonWrkrB
  • 255
  • 4
  • 13
  • It's been a few(!) years, things have moved around a bit, on my windows 7 machine I needed to use this: C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe C:\Windows\SysWOW64\msdatsrc.tlb – user12861 Dec 18 '18 at 14:36
2

This answer should work if the computer was compiling the dll/ocx at some point but isn't any more, but MAY also work if your computer never has compiled it either.

So the simple answer to the question is to check if your machine has pending updates waiting for a reboot.

If so make sure that you reboot your machine.

If The problem is still occuring after a reboot then try re-registering MSCOMCTL.OCX which should be in your windows subdirectories; either c:\windows\system32 or c:\windows\SysWOW64. Note you use regsvr32 to register the ocx.

Matt Vukomanovic
  • 1,392
  • 1
  • 15
  • 23
1

I have Windows Server 2008 R2 (64bit) and I was having the same issue and I got thru as per below:

  1. Go to the path C:\Windows\Microsoft.NET\Framework\v4.0.30319
  2. Execute 'regtlibv12 msdatsrc.tlb' (without quotes)
0

I have this issue with one of a production computer. It is a newly formatted PC with Windows XP as its OS. During this writing, we know that Windows XP does not offer updates anymore. What I did was, I installed VB6 since I have access to this software, afterwards, I installed VB6 Service Pack 6 and the error was corrected. I have to install VB6 Enterprise because the installation of the service pack requires the data included in the installation of the said IDE.

Mr.J
  • 430
  • 2
  • 10
  • 30