docs / articles / Add Microsoft Date & Time Picker to Excel

Add Microsoft Date & Time Picker to Excel

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

Streamlining your Excel workflow often involves automating repetitive tasks, and handling dates and times is a common challenge. While Excel has built-in date and time functions, inserting a date and time picker control can significantly enhance user experience and productivity. In this guide, we'll explore how to add a Microsoft date and time picker control to Excel using VBA (Visual Basic for Applications).

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

Before we dive in, ensure you're comfortable with basic VBA concepts and have Excel installed on your computer. Let's get started!

Excel VBA USERFORMS #25 Date Picker Calendar revealed! Loop through Userforms and Controls  Example
Excel VBA USERFORMS #25 Date Picker Calendar revealed! Loop through Userforms and Controls Example

Understanding Date and Time Picker Control

The Microsoft Date and Time Picker control is a user-friendly interface that allows users to select dates and times easily. It's a part of the Windows common controls library and can be integrated into Excel using VBA.

How to insert dates from a Popup Calendar (date picker) in Excel – user guide | XLTools
How to insert dates from a Popup Calendar (date picker) in Excel – user guide | XLTools

By adding a date and time picker control to your Excel worksheet, you can simplify data entry, reduce errors, and improve the overall user experience.

Why Use a Date and Time Picker Control?

How to Create a Timestamp in Excel
How to Create a Timestamp in Excel

Using a date and time picker control offers several advantages over traditional data entry methods:

  • User-friendly: Picker controls provide an intuitive interface for selecting dates and times.
  • Error reduction: By limiting user input to valid dates and times, you can minimize data entry errors.
  • Consistency: Picker controls ensure that dates and times are formatted consistently across your worksheet.

System Requirements

Excel Date Picker - How to Insert? (Step by Step Examples)
Excel Date Picker - How to Insert? (Step by Step Examples)

To use the Microsoft Date and Time Picker control in Excel, you'll need:

  • Microsoft Excel (2007 or later)
  • Microsoft Windows (XP or later)
  • Basic understanding of VBA

Adding a Date and Time Picker Control to Excel

How to Add Date Picker Calendar Drop Down in MS Excel (Easy)
How to Add Date Picker Calendar Drop Down in MS Excel (Easy)

Now that we've covered the basics, let's dive into the step-by-step process of adding a date and time picker control to your Excel worksheet.

We'll use the UserForm feature in VBA to create and display the picker control.

Calculate days from/before date in Excel
Calculate days from/before date in Excel
How to create a drop down list calendar (date picker) in Excel?
How to create a drop down list calendar (date picker) in Excel?
Mastering Excel Date & Time: Serial numbers, Networkdays, Datevalue, and more
Mastering Excel Date & Time: Serial numbers, Networkdays, Datevalue, and more
Use This Free Excel Date Picker to Enter Dates on Worksheet
Use This Free Excel Date Picker to Enter Dates on Worksheet
How to Quickly Insert Date And Time In Excel
How to Quickly Insert Date And Time In Excel
the date and time functions in excel, with instructions to use it for each task
the date and time functions in excel, with instructions to use it for each task
Daily Work Tracker Excel: Essential Functions for Better Planning
Daily Work Tracker Excel: Essential Functions for Better Planning
NEW Date Picker in Excel for Web – Finally Here
NEW Date Picker in Excel for Web – Finally Here
an image of a calendar in microsoft office 365 with the date and time tab open
an image of a calendar in microsoft office 365 with the date and time tab open
Calender in Excel ‼️ Amazing Excel trick using data validation and conditional formatting ✅ #Excel
Calender in Excel ‼️ Amazing Excel trick using data validation and conditional formatting ✅ #Excel
How to Add an Updating Date and Time in Microsoft Word (PC & Mac)
How to Add an Updating Date and Time in Microsoft Word (PC & Mac)
Create a Calendar in Microsoft Excel or Insert a Reference Calendar
Create a Calendar in Microsoft Excel or Insert a Reference Calendar
How to create a date picker in Excel!🙏
How to create a date picker in Excel!🙏
Create a date sequence in Excel and auto fill date series
Create a date sequence in Excel and auto fill date series
Auto-Write Dates in Excel With This simple Trick in Seconds!📅  #excel #excelshorts
Auto-Write Dates in Excel With This simple Trick in Seconds!📅 #excel #excelshorts
Perfect Inserting A Dropdown Calendar In Excel
Perfect Inserting A Dropdown Calendar In Excel
the excel time and date sheet
the excel time and date sheet
Excel shortcuts
Excel shortcuts
Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)
Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)
Excel Autofill - how to quickly enter Months, Days, Dates and Numbers without typing
Excel Autofill - how to quickly enter Months, Days, Dates and Numbers without typing

Creating a UserForm

First, you'll need to create a UserForm to host the date and time picker control:

  1. Press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
  2. In the VBA editor, go to Insert > UserForm to create a new UserForm.
  3. With the UserForm selected, go to the Properties window ( press F4 if it's not visible) and change the Name property to a descriptive name, such as frmDateTimePicker.

Adding the Date and Time Picker Control

Now, let's add the date and time picker control to the UserForm:

  1. In the VBA editor, go to the Toolbox ( press Ctrl + T if it's not visible).
  2. Locate the Microsoft Date and Time Picker Control and double-click it to add it to the UserForm.
  3. With the date and time picker control selected, go to the Properties window and change the Name property to a descriptive name, such as dtpDateTime.

Using the Date and Time Picker Control

With the date and time picker control added to your UserForm, you can now use it in your Excel worksheet.

To display the UserForm and allow users to select a date and time, use the following VBA code:

```vbnet Sub ShowDateTimePicker() UserForm1.Show End Sub ```

You can assign this macro to a button or shortcut key in your worksheet for easy access.

Capturing the Selected Date and Time

To capture the selected date and time from the picker control and display it in your worksheet, use the following VBA code:

```vbnet Private Sub dtpDateTime_Change() Range("A1").Value = dtpDateTime.Value End Sub ```

In this example, the selected date and time will be displayed in cell A1 of your active worksheet. You can adjust the cell reference as needed.

Troubleshooting Common Issues

While adding a date and time picker control to Excel is generally straightforward, you may encounter some common issues. Here are a few troubleshooting tips:

Control Not Visible or Functional

If the date and time picker control is not visible or functional, ensure that:

  • The control is properly added to the UserForm (as described in the previous section).
  • The UserForm is displayed using the Show method (e.g., UserForm1.Show).
  • The control has a descriptive and unique name (e.g., dtpDateTime).

Incorrect Date or Time Format

If the selected date or time is not displayed in the expected format, adjust the Format property of the date and time picker control in the UserForm's Properties window.

With these tips and tricks, you should now be able to add a Microsoft date and time picker control to your Excel worksheet with ease. This user-friendly feature will not only enhance your Excel experience but also improve productivity and reduce errors in your data entry processes.

Happy automating!