Userform (Combobox)

TiaXL

Board Regular
Joined
Jun 17, 2011
Messages
124
Hi All

Need a bit of help. I have a userform with 1 combobox on it and an OK button this is used to filter data based on a week ending date. When selecting the drop down list the dates display correctly as "DD/MM/YY" but when an option is selected it changes to an excel general format of "40175" any idea how I can make the form keep its formatting after the value is selected ?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi, Tia.

When you have selected a date, is there any code executed?
If so, would it be possible for you to post it on here?
 
Upvote 0
Don't link the combobox to a range directly - populate it in code using the List property or AddItem.
 
Upvote 0
Don't link the combobox to a range directly - populate it in code using the List property or AddItem.

Additem is no good I am listing week ending dates for the whole year, so too many. I am using Listfill
 
Upvote 0
You can use Additem in a loop, or create an array of the values, then use List. If you use the Rowsource then you will get the behaviour you describe. If you really want to use RowSource, then use the Change event to format the value as dd/mm/yyyy.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,754
Members
452,940
Latest member
rootytrip

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