You'll need to set the Format property to dtpCustom, and then you can set the CustomFormat property to "HHmm". If you want to set these properties by code, assuming that the date and time picker control is named DTPicker1, try...
Code:
With Me.DTPicker1
.Format = dtpCustom
.CustomFormat = "HHmm"
End With
With dtpCustom, you can't select a time from the drop down menu. You can only select a date. So you would have to either tab to the date and time picker or click the first two digits so that the first two digits of the time are selected, and then you change the time. As an example, with the first two digits selected, you can either type 8:30 or first type 8, and then right-arrow to the next two digits to enter 30.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.