I am using the following code to get dates from text boxes in to my spreadsheet:
For some reason one of them comes out in the correct UK format and the other comes out in the US format. See below screen shot.
I have check the formatting of the two cells and their both set to DD/MM/YYY with UK locale so I can't understand why the top one comes out wrong.
Any Ideas?
Thanks
Matt
Code:
Range("rngDateFromDisplay").Value = Format(tbDateFrom.Text, "Short Date")
Range("rngDateToDisplay").Value = Format(tbDateTo.Text, "Short Date")
For some reason one of them comes out in the correct UK format and the other comes out in the US format. See below screen shot.
I have check the formatting of the two cells and their both set to DD/MM/YYY with UK locale so I can't understand why the top one comes out wrong.
Any Ideas?
Thanks
Matt