docs / articles / VBA Date Time Picker for 64-bit Applications

VBA Date Time Picker for 64-bit Applications

Eric Jul 09, 2026 2026-07-09 04:40:47

When working with VBA (Visual Basic for Applications) in a 64-bit environment, you might find that certain controls, like the DateTimePicker, behave differently or may not work as expected. This article aims to guide you through understanding and resolving issues related to the DateTimePicker control in a 64-bit VBA setup.

Responsive Time Picker UI Design with HTML CSS JavaScript Free Download  Modern Dark Theme
Responsive Time Picker UI Design with HTML CSS JavaScript Free Download Modern Dark Theme

Before delving into the specifics, it's crucial to understand that the 32-bit and 64-bit versions of Office applications have different behaviors due to the differences in their architecture. This can lead to compatibility issues with certain controls, including the DateTimePicker.

Use This Free Excel Date Picker to Enter Dates on Worksheet
Use This Free Excel Date Picker to Enter Dates on Worksheet

Understanding the DateTimePicker Control in 64-bit VBA

The DateTimePicker control is not natively supported in 64-bit VBA. This is because the control is part of the Windows Common Controls library, which is not available in the 64-bit version of the Windows API. Therefore, using the DateTimePicker control in a 64-bit VBA project may result in runtime errors or unexpected behavior.

two different screens with the same time and date
two different screens with the same time and date

However, there are workarounds to use the DateTimePicker control in a 64-bit VBA environment. These involve using third-party libraries or creating custom controls. We'll explore these solutions in the following sections.

Using a Third-Party Library: VBA-TaskPanel

an image of a calendar with the date on it and time left for each month
an image of a calendar with the date on it and time left for each month

One popular third-party library that provides a DateTimePicker control for 64-bit VBA is VBA-TaskPanel. This library includes a variety of controls, including a DateTimePicker, that are compatible with 64-bit Office applications.

To use VBA-TaskPanel, you'll first need to download and install the library. Once installed, you can add the DateTimePicker control to your VBA project and use it like any other control. For more information on how to use VBA-TaskPanel, refer to the official documentation: VBA-TaskPanel GitHub Page.

Creating a Custom Control: UserForm with DateTime Picker

Microsoft Date and Time Picker Control - How To Enable and Use It
Microsoft Date and Time Picker Control - How To Enable and Use It

Another approach is to create a custom control using a UserForm. You can add a DateTime Picker control to a UserForm, which will work in both 32-bit and 64-bit VBA environments. To create a custom control, follow these steps:

  1. Open the Visual Basic Editor in your VBA project.
  2. Go to Insert > UserForm to create a new UserForm.
  3. From the Toolbox, drag and drop a DateTime Picker control onto the UserForm.
  4. Customize the DateTime Picker control as needed.
  5. Save the UserForm and use it in your VBA project.

Using a UserForm with a DateTime Picker control provides a simple and effective solution for using a DateTimePicker in a 64-bit VBA environment. However, keep in mind that this approach may not offer the same level of functionality as using a native DateTimePicker control.

an image of a calendar with the date 2013 in pixel art style on it's side
an image of a calendar with the date 2013 in pixel art style on it's side

Best Practices for Using DateTimePicker in 64-bit VBA

When working with the DateTimePicker control in a 64-bit VBA environment, there are a few best practices to keep in mind:

Innovation: Digital Clock in Excel (VBA+Autoshapes)
Innovation: Digital Clock in Excel (VBA+Autoshapes)
three calendars with different times on them, each showing the same date and month
three calendars with different times on them, each showing the same date and month
three rulers with numbers on them are shown in blue and white, as well as one ruler
three rulers with numbers on them are shown in blue and white, as well as one ruler
a pixelated image of a calculator on a black background with the words,
a pixelated image of a calculator on a black background with the words,
Simple jQuery Date Picker for Bootstrap
Simple jQuery Date Picker for Bootstrap
Excel Date Picker — Sam Radakovitz
Excel Date Picker — Sam Radakovitz
an image of a computer screen with numbers and symbols on it, as well as the text
an image of a computer screen with numbers and symbols on it, as well as the text
Useful Calendar and Date Picker Scripts for Developers
Useful Calendar and Date Picker Scripts for Developers
The Ultimate Excel Date Picker
The Ultimate Excel Date Picker
A Magic Date Input using Parser Combinators in Typescript
A Magic Date Input using Parser Combinators in Typescript
Pixelwatch
Pixelwatch
How to Set or Change a Computer's Date and Time
How to Set or Change a Computer's Date and Time
Learn Java for Android Development: Date and Time Basics | Envato Tuts+
Learn Java for Android Development: Date and Time Basics | Envato Tuts+
How to Create a Date Table in Power BI
How to Create a Date Table in Power BI
an image of a computer keyboard with some words on it
an image of a computer keyboard with some words on it
the game over screen is shown with numbers and symbols for each player's score
the game over screen is shown with numbers and symbols for each player's score
Batterie
Batterie
an image of a calendar with multiple times and numbers on it, including the date for each
an image of a calendar with multiple times and numbers on it, including the date for each
Tandy Deskmate 3.05 (Desktop 3.69)
Tandy Deskmate 3.05 (Desktop 3.69)
Date Interval with jQuery
Date Interval with jQuery

1. Test thoroughly: Always test your VBA project in both 32-bit and 64-bit environments to ensure compatibility and functionality.

2. Use the latest libraries: Make sure you're using the latest version of any third-party libraries, such as VBA-TaskPanel, to take advantage of bug fixes and new features.

3. Consider alternative controls: If the DateTimePicker control is not crucial to your application, consider using alternative controls, such as a ComboBox with a Date Picker, which may offer better compatibility and functionality in a 64-bit environment.

In conclusion, while the DateTimePicker control may present challenges in a 64-bit VBA environment, there are viable workarounds to overcome these issues. By understanding the limitations and exploring the available solutions, you can effectively use the DateTimePicker control in your 64-bit VBA projects. Happy coding!