Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in a combobox
Hi
I have again a problem whith format i have yhis Dim rng2 As Range Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown)) Me.combo_sedatoer.List = rng2.Value The value in my range is date And in the sheet the value is dd-mm-yyyy But in the combobox the value are mm/dd/yyyy I have try to use format "dd-mm-yyyy" but don't know where to do this i get a error when i try So maybe someone can help? Alvin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in a combobox
Hi,
This solved it for me ( I use UK date formats): Me.combo_sedatoer.rowsource = rng2.address "alvin Kuiper" wrote: Hi I have again a problem whith format i have yhis Dim rng2 As Range Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown)) Me.combo_sedatoer.List = rng2.Value The value in my range is date And in the sheet the value is dd-mm-yyyy But in the combobox the value are mm/dd/yyyy I have try to use format "dd-mm-yyyy" but don't know where to do this i get a error when i try So maybe someone can help? Alvin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in a combobox
Hi topper
yes the right date comes but when you choose a value the value in the combobox become a number?? Alvin "Toppers" wrote: Hi, This solved it for me ( I use UK date formats): Me.combo_sedatoer.rowsource = rng2.address "alvin Kuiper" wrote: Hi I have again a problem whith format i have yhis Dim rng2 As Range Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown)) Me.combo_sedatoer.List = rng2.Value The value in my range is date And in the sheet the value is dd-mm-yyyy But in the combobox the value are mm/dd/yyyy I have try to use format "dd-mm-yyyy" but don't know where to do this i get a error when i try So maybe someone can help? Alvin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in a combobox
Try:
Private Sub ComboBox1_Change() ComboBox1.Value = Format(CDate(ComboBox1.Text), "dd-mm-yyyy") End Sub "alvin Kuiper" wrote: Hi topper yes the right date comes but when you choose a value the value in the combobox become a number?? Alvin "Toppers" wrote: Hi, This solved it for me ( I use UK date formats): Me.combo_sedatoer.rowsource = rng2.address "alvin Kuiper" wrote: Hi I have again a problem whith format i have yhis Dim rng2 As Range Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown)) Me.combo_sedatoer.List = rng2.Value The value in my range is date And in the sheet the value is dd-mm-yyyy But in the combobox the value are mm/dd/yyyy I have try to use format "dd-mm-yyyy" but don't know where to do this i get a error when i try So maybe someone can help? Alvin |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in a combobox
Thanks.
Alvin "Toppers" wrote: Try: Private Sub ComboBox1_Change() ComboBox1.Value = Format(CDate(ComboBox1.Text), "dd-mm-yyyy") End Sub "alvin Kuiper" wrote: Hi topper yes the right date comes but when you choose a value the value in the combobox become a number?? Alvin "Toppers" wrote: Hi, This solved it for me ( I use UK date formats): Me.combo_sedatoer.rowsource = rng2.address "alvin Kuiper" wrote: Hi I have again a problem whith format i have yhis Dim rng2 As Range Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown)) Me.combo_sedatoer.List = rng2.Value The value in my range is date And in the sheet the value is dd-mm-yyyy But in the combobox the value are mm/dd/yyyy I have try to use format "dd-mm-yyyy" but don't know where to do this i get a error when i try So maybe someone can help? Alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Number format for Combobox | Excel Discussion (Misc queries) | |||
Format the items in a combobox | Excel Programming | |||
combobox format | Excel Programming | |||
ComboBox Format Problem | Excel Programming | |||
Format Display in ComboBox | Excel Programming |