I've made a combo box with the dates in it but when I select a date it changes it to a different format ie 18-dec-03 = 37973. All help greatly appreciated.
in the combo change event use
comboboxname.value = format(comboboxname.value,"dd/mm/yyyy"
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
So that we can be able to help you a bit more than we have been able to, try being a little more specific as to what the problem is or post a SMALL part of your code that you have been using thus far. Post the part of your code where you believe the problem is occuring.
Peace!
Mike
Didn't get the answers that you wanted? Take a look at FAQ219-2884
Private Sub ComboBox1_Click()
Temp = ComboBox1.Text
Temp1 = Format(Temp, "dd, mmm, yy"
ComboBox1.Text = Temp1
End Sub
Basically I have column A1:A100 as my range for my combo box and when you click on the arrow on the commbo box and select the date you want it changes the format of the date to say 345612 which I know is the computers recognition of this. The above formula does work (which I got of a colleague) but I thought there must be a quicker way of doing this.
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
we'll get there eventually Mike ;-)
Xmas beer for helping out
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
I did change it to CHANGE but i thought I could just put in Geoffs formula
comboboxname.value = format(comboboxname.value,"dd/mm/yyyy" Which is a lot shorter than mine but it didnt work. The formula that I sent in works with CLICK as well as CHANGE. If you can make the formula shorter then great but don't worry if you cant (i always live in hope)
My code works fine - you must change comboboxname to reflect whatever name your combobox has so if it's called combobox1 for example then:
Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dd mmm yy"
End Sub
will work
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
Yeh...well....... I like to reference things properly ;-)
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.