How to Add the DatePicker Control to Excel VBA on 64-Bit Windows
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.

- 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.
Ensure you are logged into your computer with Administrator privileges and close all active instances of Microsoft Excel before registering system files.
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.
Obtain the MSCOMCT2.OCX file from a trusted, official source. Avoid downloading from unverified third-party DLL sites to prevent malware infections.
Open File Explorer and navigate to C:\Windows\SysWOW64. Paste the downloaded mscomct2.ocx file into this directory.
Click the Windows Start menu, type 'cmd' in the search bar, right-click on 'Command Prompt', and select 'Run as administrator'.
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.
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.

Use a Custom VBA UserForm Calendar
Since the legacy DatePicker control is notoriously unstable or unsupported on 64-bit Office versions, building a custom calendar using standard VBA controls is a more robust 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. Download WPS Office: Visit the official WPS Office website and download the free installation package for Windows.
- 2. Install the Application: Run the installer and follow the on-screen prompts to set up WPS Office on your computer in minutes.
- 3. Open Your Macro Workbook: Launch WPS Spreadsheet and open your existing .xlsm files to continue working with your macros and VBA forms immediately.

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.




