This seems to be a really odd problem I'm having with userforms and dates. Specifically the American date format (mm/dd/yy) being used even though the pc and excel all runs on the UK date format (dd/mm/yy).
So here is my problem:
I have a button on a userform that generates a new ID number and the current date for new quotes.
At first when I used it, even though the date on my pc is 11/06/15 (dd/mm/yy), it was generating the date 06/11/15 (mm/dd/yy).
I found a fix to that by changing the date generation to:
This changed the date format back to 11/06/15 and when I saved the entry it wrote it to my spreadsheet as 11/06/15 (correct).![]()
Please Login or Register to view this content.
At this point everything seemed to be running smoothly.
However, I also have a button for finding quotes and repopulating all the data so you can go back at a later date and fill in the blanks.
When it finds the date from the quote on the spreadsheet and fills in the text box on the userform, it goes back to the american style 06/11/15.
When I press save this time it saves it to my spreadsheet as the american format.
![]()
Please Login or Register to view this content.
Does anyone have a fix for this? I need it to generate a UK format date from today's date when I press a certain button and also keep the correct format of date when pulling the date from the spreadsheet.
Bookmarks