hayden_pinto
New Member
I have made a Userform where in one of the drop downs allows the user to select the time
Eg
Request Time - 12:30:00 AM but when the data is selected the drop down shows 0.0208333333333333
which is the wrong format
in the excel sheet i have put the right format as below
Request Time
12:00:00 AM
12:30:00 AM
1:00:00 AM
Below is the VB code in using
Private Sub UserForm_Initialize()
Label7.Caption = Format(Now(), "dd-MMM-YYYY")
Label8.Caption = Format(Now(), "hh:mm:ss")
ComboBox1.SetFocus
ComboBox1.RowSource = "=Sheet1!b2:b7" 'Process
ComboBox4.RowSource = "=Sheet1!E2:E5" 'Update
ComboBox5.RowSource = "=Sheet1!F2:F49" 'Time
Please help me get the right format for the time in the drop down
Eg
Request Time - 12:30:00 AM but when the data is selected the drop down shows 0.0208333333333333
which is the wrong format
in the excel sheet i have put the right format as below
Request Time
12:00:00 AM
12:30:00 AM
1:00:00 AM
Below is the VB code in using
Private Sub UserForm_Initialize()
Label7.Caption = Format(Now(), "dd-MMM-YYYY")
Label8.Caption = Format(Now(), "hh:mm:ss")
ComboBox1.SetFocus
ComboBox1.RowSource = "=Sheet1!b2:b7" 'Process
ComboBox4.RowSource = "=Sheet1!E2:E5" 'Update
ComboBox5.RowSource = "=Sheet1!F2:F49" 'Time
Please help me get the right format for the time in the drop down