Ralph Gregory
Board Regular
- Joined
- Aug 14, 2003
- Messages
- 125
Hi all I've racked my brains with this and I keep coming across the same problem
I have a text box ("tbDate") which I can type a date into in uk format "04/07/2020" ("dd/mm/yyyy") works fine and looks fine. When I save my data to another sheet using the following code
With Worksheets("Invoices")
.Range("B" & a).value = Worksheets("Invoice").Shapes("tbDate").TextFrame.Characters.Text
more code
end with
the result saves in US format "07/04/2020" even if i have the cells formatted as UK date
I even added the following code line to force it into uk Format
.Range("B" & a).value = Format(Worksheets("Invoice").Shapes("tbDate").TextFrame.Characters.Text,"dd/mm/yyyy")
and it made no difference!!
and yes my regional settings in windows 10 and excel are set to uk as is my default english and keyboard settings
Using 2019 version of excel ....Ive searched the web and it seems many people have the same problem... anyone got a solution?
If the day number is greater than 12 the dates tranfer Correctly...
I have a text box ("tbDate") which I can type a date into in uk format "04/07/2020" ("dd/mm/yyyy") works fine and looks fine. When I save my data to another sheet using the following code
With Worksheets("Invoices")
.Range("B" & a).value = Worksheets("Invoice").Shapes("tbDate").TextFrame.Characters.Text
more code
end with
the result saves in US format "07/04/2020" even if i have the cells formatted as UK date
I even added the following code line to force it into uk Format
.Range("B" & a).value = Format(Worksheets("Invoice").Shapes("tbDate").TextFrame.Characters.Text,"dd/mm/yyyy")
and it made no difference!!
and yes my regional settings in windows 10 and excel are set to uk as is my default english and keyboard settings
Using 2019 version of excel ....Ive searched the web and it seems many people have the same problem... anyone got a solution?
If the day number is greater than 12 the dates tranfer Correctly...