You didn't say *where* on the form (by which I'm assuming you mean worksheet
that is set up to look like a "form" and not a VB UserForm), so I'll assume
you want to put the date into the active cell. Right click the tab at the
bottom of the worksheet that you placed the DatePicker control on, select
View Code from the popup menu that appeared, and then copy/paste this code
into the code window that appeared...
'********** START OF CODE **********
Private Sub DTPicker21_CloseUp()
ActiveCell.Value = DTPicker21.Value
End Sub
Private Sub DTPicker21_KeyUp(KeyCode As Integer, ByVal Shift As Integer)
If KeyCode = 13 Then ActiveCell.Value = DTPicker21.Value
End Sub
'********** END OF CODE **********
Now, go back to the worksheet. First, if the "Design Mode" icon on the
Controls panel of the Developers tab is not highlighted, click it to
highlight it and then just move the DatePicker control around and then place
it where you want it (I found the "moving around" part necessary, otherwise
the control is placed as a duplicate in the upper left corner of the grid).
Next, turn "Design Mode" off by clicking the icon again. That's it. Select a
cell and then choose a date from the drop down calendar and it will go into
the cell you selected. If you choose to change the date in the control via
the keyboard (that is, without using the drop down), then you must press the
Enter key when you are done in order to place the date you changed the
control to via the keyboard into the active cell.