docs / articles / VBA Date Picker for Excel 365 UserForm on 64-bit Systems

VBA Date Picker for Excel 365 UserForm on 64-bit Systems

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

Streamlining your workflow in Excel 365 often involves automating repetitive tasks, and VBA (Visual Basic for Applications) is a powerful tool for this. One common task that can be automated is date selection, which can be achieved using a date picker in a userform. In this guide, we'll delve into creating a VBA date picker for Excel 365, focusing on 64-bit systems.

Excel VBA UserForm with Navigation Buttons ๐Ÿš€ | See it in Action! #shorts
Excel VBA UserForm with Navigation Buttons ๐Ÿš€ | See it in Action! #shorts

Before we dive into the code, let's ensure you're working in a 64-bit environment. To check, right-click on your Excel icon, select 'Properties', and look for the 'Architecture' field. It should say 'x64' for a 64-bit system.

How to Use Excel UserForm as Date Picker (with Easy Steps) - ExcelDemy
How to Use Excel UserForm as Date Picker (with Easy Steps) - ExcelDemy

Creating a Userform for the Date Picker

First, we'll create a userform to house our date picker. This userform will contain a label, a date picker control, and a command button.

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

To create the userform, press Alt + F11 to open the Visual Basic for Applications (VBA) window. Click 'Insert', then 'UserForm'. Name it 'DatePickerForm' in the Properties window.

Adding Controls to the Userform

NEW Date Picker in Excel for Web โ€“ Finally Here
NEW Date Picker in Excel for Web โ€“ Finally Here

From the 'Toolbox' (press Ctrl + T to display it), drag and drop a 'Label' control, a 'Date Picker' control, and a 'Command Button' onto the userform. Name them 'lblDate', 'dtPicker', and 'cmdOK' respectively.

Set the 'Date Picker' control's 'Value' property to Now to ensure it displays the current date by default.

Writing VBA Code for the Date Picker

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

Double-click the userform to open the VBA window. Write the following code to make the 'OK' button functional:

```vbnet Private Sub cmdOK_Click() Me.Hide MsgBox "You selected: " & dtPicker.Value End Sub ```

This code hides the userform and displays a message box showing the selected date when the 'OK' button is clicked.

Using the Date Picker in Your VBA Code

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

Now, let's use this date picker in our VBA code. Open a new module in the VBA window and write the following code:

```vbnet Sub ShowDatePicker() DatePickerForm.Show Dim selectedDate As Date selectedDate = DatePickerForm.dtPicker.Value MsgBox "You selected: " & selectedDate End Sub ```

This code shows the userform, selects the date using the date picker, and displays a message box with the selected date.

How to create a drop down list calendar (date picker) in Excel?
How to create a drop down list calendar (date picker) in Excel?
How to create a date picker in Excel!๐Ÿ™
How to create a date picker in Excel!๐Ÿ™
a screenshot of the vba user form
a screenshot of the vba user form
Excel VBA UserForm with Navigation Buttons | Move Between Records Easily!
Excel VBA UserForm with Navigation Buttons | Move Between Records Easily!
Data Entry Form in Excelโ€ผ๏ธ #excel
Data Entry Form in Excelโ€ผ๏ธ #excel
VBA UserForm
VBA UserForm
Excel VBA Copy Data from Multiple Workbooks
Excel VBA Copy Data from Multiple Workbooks
Excel Date Picker โ€” Sam Radakovitz
Excel Date Picker โ€” Sam Radakovitz
Interactive Userform in Excel VBA
Interactive Userform in Excel VBA
What You Can Do with VBA (6 Practical Uses)
What You Can Do with VBA (6 Practical Uses)
Cadastro Notas Fiscais
Cadastro Notas Fiscais
Create a date sequence in Excel and auto fill date series
Create a date sequence in Excel and auto fill date series
Excel VBA: Insert Data into Table (4 Examples)
Excel VBA: Insert Data into Table (4 Examples)
Boost Productivity - 11 Tips for Excel Data Entry Form
Boost Productivity - 11 Tips for Excel Data Entry Form
Excel VBA Data Entry Application with SQL database
Excel VBA Data Entry Application with SQL database
How to create and use Data Entry Form in Excel
How to create and use Data Entry Form in Excel
Data Entry Form in Excel
Data Entry Form in Excel
a screen shot of a spreadsheet in microsoft office with the date and time tab open
a screen shot of a spreadsheet in microsoft office with the date and time tab open
financial excel
financial excel
Free VBA Programming Book
Free VBA Programming Book

Customizing the Date Picker's Appearance

You can customize the date picker's appearance by modifying its properties. For example, set the 'Font' property to change the font, or set the 'BackStyle' property to 'fmBackStyleOpaque' to make the control opaque.

To change the date format, use the 'Format' property. For instance, set it to Long Date for a full date format (e.g., "Monday, April 10, 2023").

In conclusion, creating a VBA date picker in Excel 365 on a 64-bit system can significantly enhance your productivity by automating date selection tasks. This guide has provided a comprehensive walkthrough, from creating the userform to customizing the date picker's appearance. Now, go ahead and integrate this date picker into your VBA projects to streamline your workflow!