I've got a spreadsheet that I am interested in calculating difference between times that span over two days. I'm trying to
eliminate the amount of keystrokes and ensure data integrity so I am wanting to use the date and time picker in excel.
I've created a userform called userform1 placed a custom formatted date time picker control that I formatted it so
that it shows date MM/dd/yyyy and time H:mm.
I need some help getting the selected date and time into the active
cell, preferrably upon closing the userform.
I found some vba on ozgrid for the calendar control, but it doesn't seem to translate to the date/time picker.
the userform I've inserted this code and when I call the userform via macro, I get this error "method or data member not
found" and the debugger highlights Me.Calendar1 in the Userform_Activate procedure
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy"
Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
Can someone help me mod this or provide some alternate code?