How To Register An Ocx File Manually

File

I like to know what inside the file before I install. Microsoft has solved the DLL Hell problem, but not with ocx files. I've had installs that replace SP6 files with SP4 in the installation directory. I use oleregwiz to unregister that ocx file and re-register the newer file in the c: windows system32 directory. Apr 17, 2018  You can use the Microsoft Register Server (Regsvr32.exe) to register a 32- bit.ocx file manually on a 32-bit operating system. In Visual FoxPro 3.0 and 3.0b, Regsvr32.exe is located in the VfpSamplesOle directory, and in Visual FoxPro 5.0, Regsvr32.exe is located in the Vfp directory.

Active4 years, 2 months ago

I want to use MSCOMM control in my MS Excel 2010 VBA. The control shall appear in Tools-> Additional Controls dialog box in VBE of MS Excel 2010.

I am trying to register MSCOMM32.OCX on my 64-bit Windows 7 machine. However, as I try to register it using regsvr32 as shown in the command window below, I am getting shown error popup.

What am I missing here? Why is this component not getting registered?

Or this is not the correct way to include MSCOMM control in MS Excel VBA?

Cmd prompt here windows 10. I have read following:

But to no avail.

Community
Jay

migrated from stackoverflow.comNov 28 '12 at 4:54

This question came from our site for professional and enthusiast programmers.

2 Answers

Put your ocx control to C:WindowsSysWOW64 and try to re-register it in that location with the 32 bit regsvr32:

If it doesn't work: you could try to pick a different version. you could also check if it has all its dependencies already installed.

Der Hochstapler
70.1k51 gold badges239 silver badges292 bronze badges
SalarosSalaros

Here is what I have read about mscomct2.ocx. I have not verified anything.

mscomct2.ocx is an activex calendar control. You can obtain an up to date version of mscomct2.ocx from http://activex.microsoft.com/controls/vb6/mscomct2.cab.

32-bit windows, such as XP, have mscomct2.ocx in c:windowssystem32.

For windows 64-bit you need to put mscomct2.ocx in a different directory, c:windowssyswow64.

In conflict with the above paragraph, I have also read that you need to put the MSCOMCT2.OCX in the same folder as your program. Eg. if your program is in C:MyApp folder, then put the MSCOMCT2.OCX file in C:MyApp folder too.

Once the mscomct2.ocx file is installed, it needs to be registered. You can use the Microsoft Register Server (Regsvr32.exe) to register a 32- bit .ocx file manually on a 32-bit operating system. You must run regsvr32 as admin.

How To Register A Dll

In conflict with the above statement from support.microsoft.com, this works on a 64-bit system as long as the ocx file is in the syswow64 directory.

If you have obtained the file and registered, yet still have problmes, it might help to first unregister, then register:

How To Register An Ocx File Manually Without

regsvr32 /u mscomctl.ocx

regsvr32 mscomctl.ocx

Command To Register Ocx File

Kevin FieldKevin Field