Hi
There's been a lot of messages about date formatting when using VBA which I've referred to but I still have a problem that I don't understand and am hoping someone maybe able to help and explain.
I have a form which uses a text box to store a date. A date may be written into this text box by a user and the date is then written to the underlying workbook to be stored for future reference.
When the form is loaded the date is loaded back into the text box on the form.
All that works fine but the date is written to Excel in dd/mm/yy format and the text box then loads the date as mm/dd/yy.
to write to the excel sheet;
[range]=format(text_box1.value,"dd/mm/yy")
to write back to the text box;
text_box1.value=format([range],"dd/mm/yy")
I have tried using different date formats but I always seem to get the same problem. I know that the Excel sheet is displaying the correct date. In other words the text box value seems to be written ok to the sheet. It's when the text box is given back the value that the format is changed.
System date is English UK (dd/mm/yy).
Many thanks
Bookmarks