Fix for RICHTX32.OCX Component Error when running a Program

When you run an application which was built using (classic) Visual Basic 6.0, the following error message may occur and the program terminates.

Component ‘RICHTX32.OCX’ or one of its dependencies not correctly registered: a file is missing or invalid.

This happens if the program uses Rich TextBox ActiveX Control (RichTx32.ocx), but does not include the ActiveX file in the setup package. This runtime is not included in Windows and is supposed to be distributed along with the program. And, RichTx32.ocx ActiveX Control is not included in VB6 run-time distribution package from Microsoft either.

Download RichTx32.ocx

You may download it here: Unzip the archive and extract the file RichTx32.ocx to one of these folders:

In Windows 32-bit systems, extract the file to: C:\Windows\System32

In Windows 32-bit systems, extract the file to: C:\Windows\SysWOW64

Register the OCX

You need to register RichTx32.ocx module using the following command from elevated or Admin Command Prompt.

For Windows 32-bit

regsvr32.exe %systemroot%\system32\RICHTX32.OCX

For Windows 64-bit

%system32\syswow64\regsvr32.exe %systemroot%\syswow64\RICHTX32.OCX

You should see the message DllRegisterServer in C:\WINDOWS\system32\RICHTX32.OCX succeeded. after running the above command.

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

2 thoughts on “Fix for RICHTX32.OCX Component Error when running a Program

  1. Windows 7 x64 solution (COMPILED):

    Instead of extracting to system32, extract to syswow64.

    Instead of using the run window, go to accessories -> cmd.exe and right click on it. Run as administrator. Put in the following command:

    regsvr32.exe %systemroot%\syswow64\RICHTX32.OCX

    and you should get the success message.

Comments are closed.