Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a userform that has two date comboboxes.
The second combobox dates (days of the applicable working week) are reliant on the whatever date (paydate) is selected. The listed dates within each combo box are in the format [dd-mm-yy], but once they are selected on the userform, they revert to a serial number date. Is the anyway of retaining the [dd-mm-yy] format when the date is selected on the userform? Many thanks in advance for your help!!! Edi, NZ |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You may want to ask this question in the Excel Programming section, rather
than the General Questions section. Do the second combo's values change based on the selection in the first combo? "Blobbies" wrote: I have a userform that has two date comboboxes. The second combobox dates (days of the applicable working week) are reliant on the whatever date (paydate) is selected. The listed dates within each combo box are in the format [dd-mm-yy], but once they are selected on the userform, they revert to a serial number date. Is the anyway of retaining the [dd-mm-yy] format when the date is selected on the userform? Many thanks in advance for your help!!! Edi, NZ |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi TWR
Thanks for the time you took to consider my problem!! Adam has helped me out below !! Many thanks Edi "TWR" wrote: You may want to ask this question in the Excel Programming section, rather than the General Questions section. Do the second combo's values change based on the selection in the first combo? "Blobbies" wrote: I have a userform that has two date comboboxes. The second combobox dates (days of the applicable working week) are reliant on the whatever date (paydate) is selected. The listed dates within each combo box are in the format [dd-mm-yy], but once they are selected on the userform, they revert to a serial number date. Is the anyway of retaining the [dd-mm-yy] format when the date is selected on the userform? Many thanks in advance for your help!!! Edi, NZ |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Jan 9, 8:49*pm, Blobbies
wrote: I have a userform that has two date comboboxes. The second combobox dates (days of the applicable working week) are reliant on the whatever date (paydate) is selected. The listed dates within each combo box are in the format [dd-mm-yy], but once they are selected on the userform, they revert to a serial number date. Is the anyway of retaining the [dd-mm-yy] format when the date is selected on the userform? Many thanks in advance for your help!!! Edi, NZ I had the same issue. You have to format the combo box using VBA. There is probably a better way, but this one works. Private Sub ComboBox1_Change() MyDate = Format(ComboBox1.Value, "mm/d/yyyy") ComboBox1.Value = Format(MyDate, "mm/d/yyyy") End Sub |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Adam - That seems to work a treat, although upsets things further on
in the code when it's simply searching for the date in General format, and it's been converted to dd/mm/yy!! Nevermind .... I'll work my way around that!! Cheers!! Edi " wrote: On Jan 9, 8:49 pm, Blobbies wrote: I have a userform that has two date comboboxes. The second combobox dates (days of the applicable working week) are reliant on the whatever date (paydate) is selected. The listed dates within each combo box are in the format [dd-mm-yy], but once they are selected on the userform, they revert to a serial number date. Is the anyway of retaining the [dd-mm-yy] format when the date is selected on the userform? Many thanks in advance for your help!!! Edi, NZ I had the same issue. You have to format the combo box using VBA. There is probably a better way, but this one works. Private Sub ComboBox1_Change() MyDate = Format(ComboBox1.Value, "mm/d/yyyy") ComboBox1.Value = Format(MyDate, "mm/d/yyyy") End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OFFSET for multiple columns & combobox format | Charts and Charting in Excel | |||
Changing the format of a cell after choosing from a combobox. | Excel Discussion (Misc queries) | |||
format combobox in userform to accept dates | Excel Worksheet Functions | |||
Number format for Combobox | Excel Discussion (Misc queries) | |||
Excel 2000 date format cannot be set to Australian date format | Excel Discussion (Misc queries) |