vb6

Component MSCOMCTL.OCX or one of its dependencies not correctly registered


I am trying to run an exe file on Windows 10 which was compiled using VB6 in 2002/2003. I get:

Run-time error:'339':
Component MSCOMCTL.OCX or one of its dependencies not correctly registered: a file is missing or invalid.

What are the extra files I need to download and install on Windows 10 to get this running ? I tried Microsoft Visual Basic 6.0 Common Controls but it still shows the same error.


Solution

  • More than likely the control is not registered properly when the app was installed. ALL VB6 apps must be installed on windows 10 "as administrator" or the controls do not register properly.

    On my windows 10 machine it is located in C:\Windows\SysWOW64

    Open a command prompt as administrator.

    enter image description here

    Then from the command line run:

    C:\Windows\System32\regsvr32 C:\Windows\SysWOW64\mscomctl.ocx

    enter image description here This should register the OCX properly. If that does not work comment here and I have a few other things to try.