Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a userform with a combobox that has dates that you can choose from. The list of dates look correct but when you choose a date it changes to the general number on the form. How can I change it so when you choose the date it still looks like a date??? -- cutsygurl ------------------------------------------------------------------------ cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041 View this thread: http://www.excelforum.com/showthread...hreadid=485635 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is rather unfortunate, isn't it? I have a workaround, but it only works
if the Combobox.MatchRequired property is False: In the Combobox_Change event code, put code like this: Private Sub ComboBox1_Change() ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy") End Sub -- - K Dales "cutsygurl" wrote: I have a userform with a combobox that has dates that you can choose from. The list of dates look correct but when you choose a date it changes to the general number on the form. How can I change it so when you choose the date it still looks like a date??? -- cutsygurl ------------------------------------------------------------------------ cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041 View this thread: http://www.excelforum.com/showthread...hreadid=485635 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have been experiencing the same problems with dates. I have a combo
box on a user form that links to a column on a worksheet containing a list of dates. When I click on the combo box a list of dates in the correct format appear. However, when I select a date it appears as a text field, I tried inserting the code as described below but I haven't had any luck. Has anybody any other ideas?? "K Dales" wrote: That is rather unfortunate, isn't it? I have a workaround, but it only works if the Combobox.MatchRequired property is False: In the Combobox_Change event code, put code like this: Private Sub ComboBox1_Change() ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy") End Sub -- - K Dales "cutsygurl" wrote: I have a userform with a combobox that has dates that you can choose from. The list of dates look correct but when you choose a date it changes to the general number on the form. How can I change it so when you choose the date it still looks like a date??? -- cutsygurl ------------------------------------------------------------------------ cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041 View this thread: http://www.excelforum.com/showthread...hreadid=485635 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
check your code
yours = ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy") should be = ComboBox1.Value = Format(ComboBox1.Value, "mm/dd/yyyy") "CiaraG" wrote: Hi, I have been experiencing the same problems with dates. I have a combo box on a user form that links to a column on a worksheet containing a list of dates. When I click on the combo box a list of dates in the correct format appear. However, when I select a date it appears as a text field, I tried inserting the code as described below but I haven't had any luck. Has anybody any other ideas?? "K Dales" wrote: That is rather unfortunate, isn't it? I have a workaround, but it only works if the Combobox.MatchRequired property is False: In the Combobox_Change event code, put code like this: Private Sub ComboBox1_Change() ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy") End Sub -- - K Dales "cutsygurl" wrote: I have a userform with a combobox that has dates that you can choose from. The list of dates look correct but when you choose a date it changes to the general number on the form. How can I change it so when you choose the date it still looks like a date??? -- cutsygurl ------------------------------------------------------------------------ cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041 View this thread: http://www.excelforum.com/showthread...hreadid=485635 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Format for Userform TextBox | New Users to Excel | |||
Restrict date format for UserForm | Excel Discussion (Misc queries) | |||
UserForm including TextBox with date (UK format) | Excel Programming | |||
Qn: Date Format in TextBox in UserForm? | Excel Programming | |||
Userform date format problem | Excel Programming |