Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am using a date field in English format that is then transposing from English to American format for no apparent reason. Everything starts ok in the English format of DD/MM/YYYY. The date is entered on a form with Private Sub UserForm_Initialize() Dim Today As Date Today = Date = 05/07/2005 ie 05 July 2005. ' displays on the userform field correctly using txtOrderDate.Value = Today = "05/07/2005" 'or txtOrderDate.Value = Format(Today, "dd/mm/yyyy") also = "05/07/2005" Private Sub Write_the_value_to_a_spreadsheet Cells(1, 1).Value = txtOrderDate.Value 'or Cells(1, 1).Value = Format(txtOrderDate.Value, "dd/mm/yyyy") The spreadsheet displays 07/05/2005 ie 07 May 2005. But the format options for the cell are showing as Customised "dd/mm/yyyy" If I change the format of that cell to show the month then May is shown - so the spreadsheet is reading it correctly as English format, so I guess it must be the VBA code that is storing it in American format. I cant see where the transposition is occuring nor how to fix it. Any ideas ? Thanks Andrew |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
permanent conversion of 1904 date format to 1900 date format | Excel Worksheet Functions | |||
How do I convert dd/mm/yy date format to yyddd Julian date format | Excel Worksheet Functions | |||
Convert date + time text format to date format | Excel Worksheet Functions | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |