Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
US - British Dates
I have a Userform where the user enters a date in british format (dd/mm/yyyy)
and the date is then copied to excel. My problem is that excel interperts it as US dates for example if the user enters 09/12/2008 the vba copies it to excel as 12/09/2008. I've tried Cstr before i.e Range("A1").Value = Cstr(TextDate.Value) and also the Format function as in Range("A1").Value = Format(TextDate.Value,"dd/mm/yyyy"), but non of this seems to do the trick. -- A. Ch. Eirinberg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
US - British Dates
Try this
mypart = Split(Textdate.Text, "/") Range("a1").Value = _ DateSerial(mypart(2), mypart(1), mypart(0)) Mike "Howard31" wrote: I have a Userform where the user enters a date in british format (dd/mm/yyyy) and the date is then copied to excel. My problem is that excel interperts it as US dates for example if the user enters 09/12/2008 the vba copies it to excel as 12/09/2008. I've tried Cstr before i.e Range("A1").Value = Cstr(TextDate.Value) and also the Format function as in Range("A1").Value = Format(TextDate.Value,"dd/mm/yyyy"), but non of this seems to do the trick. -- A. Ch. Eirinberg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Euro & British pound symbol issue | Excel Discussion (Misc queries) | |||
How can I change Excel to use the British date system? | Excel Discussion (Misc queries) | |||
How do I calculate and display in British Pounds and/or Euros? | Excel Discussion (Misc queries) | |||
currency icon (british pounds) | Excel Discussion (Misc queries) |