logo
search
VBA & Macro Problems

How to Add the DatePicker Control to Excel VBA on 64-Bit Windows

Muhammad TalhaMuhammad Talha Sep 28, 2026 872 views

Question details

The user needs to add and enable the Microsoft Date and Time Picker control (MSCOMCT2.OCX) for VBA forms on a 64-bit Windows operating system.

How to Add the DatePicker Control to Excel VBA on 64-Bit Windows
Product
Microsoft Excel
Device & OS
Windows (64-Bit)
Scenario
Developing VBA UserForms that require a calendar dropdown for date selection.
Observed behavior
The legacy Date and Time Picker control is missing from the VBA Toolbox by default on 64-bit Windows systems and requires manual downloading, placement, and registration to function properly.
Before you start

Ensure you are logged into your computer with Administrator privileges and close all active instances of Microsoft Excel before registering system files.

Solution 1Recommended

Install and Register MSCOMCT2.OCX Manually

Manually copy the control file into the Windows system folder and register it via an elevated Command Prompt to make it available in the Excel VBA Toolbox.

The Microsoft Date and Time Picker control relies on a legacy 32-bit file called MSCOMCT2.OCX. On 64-bit Windows environments, this file must be explicitly placed in the SysWOW64 directory and registered using the 32-bit version of regsvr32.

1
Download the Control File

Obtain the MSCOMCT2.OCX file from a trusted, official source. Avoid downloading from unverified third-party DLL sites to prevent malware infections.

2
Copy to SysWOW64

Open File Explorer and navigate to C:\Windows\SysWOW64. Paste the downloaded mscomct2.ocx file into this directory.

3
Run Command Prompt as Administrator

Click the Windows Start menu, type 'cmd' in the search bar, right-click on 'Command Prompt', and select 'Run as administrator'.

4
Register the Control

In the Command Prompt window, type the following command and press Enter: regsvr32 C:\Windows\SysWOW64\mscomct2.ocx. You should receive a dialog box stating that the DllRegisterServer succeeded.

5
Enable in Excel VBA

Open Excel and press ALT + F11 to launch the VBA Editor. Right-click on the Toolbox, select 'Additional Controls', check the box for 'Microsoft Date and Time Picker Control 6.0 (SP6)', and click OK.

Install and Register MSCOMCT2.OCX Manually
64-Bit Office Compatibility: While this method works for 64-bit Windows running 32-bit Office, the legacy MSCOMCT2.OCX control is generally incompatible with 64-bit versions of Microsoft Office. If you are using 64-bit Office, consider using a custom UserForm solution instead.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet and Macro Management

Struggling with Microsoft Office's legacy controls and complex setups on modern 64-bit systems? WPS Office provides a lightweight, highly compatible alternative with excellent built-in macro capabilities, ensuring a smooth and user-friendly experience without the hassle of manually registering system files.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for Windows.
  2. 2. Install the Application: Run the installer and follow the on-screen prompts to set up WPS Office on your computer in minutes.
  3. 3. Open Your Macro Workbook: Launch WPS Spreadsheet and open your existing .xlsm files to continue working with your macros and VBA forms immediately.
100% compatible with Microsoft Excel formats (.xls, .xlsx, .xlsm)Built-in macro editor for executing and editing VBA scripts seamlesslyLightweight architecture that performs flawlessly on all Windows versionsFree to use with an intuitive, tabbed user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get a 'module could not be found' error when registering MSCOMCT2.OCX?

This error typically occurs if the command prompt is not running as an administrator, or if the MSCOMCT2.OCX file is placed in the wrong directory. Ensure you have copied the file precisely to C:\Windows\SysWOW64 and that you opened the Command Prompt with admin rights.

Can I use the DatePicker control on a 64-bit version of Office?

Generally, no. The MSCOMCT2.OCX is a 32-bit control. While it works on 64-bit Windows running 32-bit Office, it is fundamentally incompatible with 64-bit installations of Microsoft Office. Users with 64-bit Office must rely on custom UserForm calendars or third-party compatible add-ins.

Where is the best place to download the MSCOMCT2.OCX file?

You should only extract it from older official Microsoft installation media (such as Visual Basic 6.0 Common Controls) or trusted developer archives. Avoid random DLL download websites, as they often bundle malware or modified files.