The “Run-Time Error ‘339’ Component <filename.ocx> or one of its dependencies not correctly registered: a file is missing or invalid” error occur when we’re trying to run a VB6 Application on Windows 7.
After searching the internet for the solution, we found the steps below that works like magic. Here it is;
- Copy the OCX File in C:\Windows\SysWow32
- Run Command Prompt (run as administrator)
- At command prompt type regsvr32 c:\windows\syswow32\<filename.ocx>
That’s it! If you’re having problem with this solution, please comment below
Just in case you also encounter “Run-Time Error ‘713’ Application Defined Error” when running a VB6 Application on Windows 7 computers, just follow the steps above, but this time, copy all the DLL files needed by your VB6 Application to C:\Windows\SysWow32 and register each DLL using regsvr32.