I have a user form with a textbox that the user enters a date into.
When the record is 'saved' - copied to the next empty row in the worksheet, the date changes from dd/mm/yyyy to mm/dd/yyyy even though the settings are for English (UK) date settings both in Excel and locally on the machine.
How do I force the worksheet to accept the text string as a date value without it changing it to US?
When I checked the value of the cell after adding a row through the user form:
It tells me the format is m/d/yyyy
I have tried applying the formatting as the row is added on a button click
and I have tried to format the text box as the userform is initialized
Neither seem to force the 'date' to be displayed properly...
When the record is 'saved' - copied to the next empty row in the worksheet, the date changes from dd/mm/yyyy to mm/dd/yyyy even though the settings are for English (UK) date settings both in Excel and locally on the machine.
How do I force the worksheet to accept the text string as a date value without it changing it to US?
When I checked the value of the cell after adding a row through the user form:
Code:
MsgBox ActiveCell.NumberFormat
It tells me the format is m/d/yyyy
I have tried applying the formatting as the row is added on a button click
Code:
.Offset(RowCount, 7).Value = Format(Me.Targetdate.Value, "dd/mm/yyyy")
and I have tried to format the text box as the userform is initialized
Code:
Targetdate.Value = Format(Targetdate, "dd/mm/yyyy")
Neither seem to force the 'date' to be displayed properly...