July 22, 2015

Date Time Picker Tool on User Form

Watch the training video to learn how to insert a date time picker tool on an Excel User Form to transfer dates quickly and easily on to an Excel worksheet:


I have discussed date and time picker and calendar controls in this training video earlier. But quite a few of my YouTube subscribers couldn’t locate the data and time picker tool in Excel and recently I got this message:

Thanks for your tutorials, they are very well done – and nice and quick. I have a request that I have been having an extremely difficult time trying to accomplish or find any info about. I want my employees to be able to just click and choose the date like a date picker in many programs. I use this in Quickbooks to enter dates quickly. I think it is something that should be so simple and literally just part of excel – but apparently its not!! LOL….Please let me know if you can help – Thank You Again!!!

First we create a macro in our Visual Basic Editor called ShowUserForm and code it like this:

Sub showUserForm()
End Sub

Next we create a user-form with the following controls and code them accordingly as shown in the training video also:

Date Time Picker Tool on User Form
Date Time Picker Tool on User Form

Private Sub CommandButton1_Click()

ActiveCell = DTPicker1.Value
ActiveCell = ActiveCell.Offset(1, 0).Activate
If ActiveCell = True Then ActiveCell = “”
End Sub

Private Sub CommandButton2_Click()
Unload Me
End Sub

Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)

End Sub

Private Sub UserForm_Initialize()
DTPicker1.Value = Date
End Sub

3 thoughts on “Date Time Picker Tool on User Form

  1. That’s perfect. How about when I want to insert the text in Word instead of an active cell in Excel?

Comments are closed.