Userform Combobox dropdown to show date format...

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
I have Userform Combobox dropdown which shows date format but when i select the drop down the Combobox value shows general number format why?
Otherwise everything is okay.

Please suggest!
Pedie
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
how have you populated the combobox
 
Upvote 0
how have you populated the combobox

I do not have UserForm_Initialize code...I have linked the combobox value to b3 thats all. and the row source is from range(A1:A10) the drop down shows format of date in 1-Jan etc but when i select the drop down it dislays in combobox as = 40176
Code:
Private Sub ComboBox1_Change()
Range("B3").Value = ComboBox1.Value
End Sub
 
Upvote 0
Try:-
Code:
Private Sub ComboBox1_Change()
ComboBox1.value = Format(ComboBox1.value, "dd-mmm-yyyy")
End Sub
Mick
 
Upvote 0
Hi Mike, I have tried this code myself but it still won't give me the result in that format.
Thanks
Pedie
 
Upvote 0

Forum statistics

Threads
1,216,096
Messages
6,128,807
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

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.
Go back
Back
Top