I have a textbox in a userform where a date can be added. To make sure it is in DD/MM/YYYY format I use CDATE function. e.g. .Range(1) = CDate(Me.DATE.Value).
However:
1) If I leave this textbox empty it results in an error message as there is no date input.
2) If I remove the CDate function e.g. .Range(1) = Me.DATE.Value, it results in MM/DD/YYYY.
My excel is set to UK date mode.
How do I make it optional to enter a date in the textbox AND for it to be in DD/MM/YYYY format?
Thanks!
Bookmarks