ashleyuk1984
03-25-2014, 09:40 AM
Hi,
I have a small problem, where no doubt the solution is smacking me straight in the face.
If you can imagine a userform, with a textbox, and a submit button.
The textbox needs to simply submit a date.
The user inputs the date as: Mar-14
Upon hitting submit, the date gets inserted into A1 as Mar-14 (which is correct - March 2014)... But the DAY is incorrect.
Ideally, I want it to be 01/03/2014 when I select the cell.
But instead it is shown as 14/03/2014 (I presume because of the year)
But how do I make it show 01/03/2014.
It's not causing any issues right now... But I want to fix it sooner rather than later.
How the userform submits the date.
http://ultraimg.com/images/MhsTB.png
How I WANT the userform to submit the date.
http://ultraimg.com/images/iUdt.png
Like I said, the solution is smacking me right in the face. :banghead:
The code that I'm using the format the date is:
Range("A" & LastRow).NumberFormat = "mmm-yy"
Ignore the columns and rows in the pictures... I'm using "A" to make things easier.
I have a small problem, where no doubt the solution is smacking me straight in the face.
If you can imagine a userform, with a textbox, and a submit button.
The textbox needs to simply submit a date.
The user inputs the date as: Mar-14
Upon hitting submit, the date gets inserted into A1 as Mar-14 (which is correct - March 2014)... But the DAY is incorrect.
Ideally, I want it to be 01/03/2014 when I select the cell.
But instead it is shown as 14/03/2014 (I presume because of the year)
But how do I make it show 01/03/2014.
It's not causing any issues right now... But I want to fix it sooner rather than later.
How the userform submits the date.
http://ultraimg.com/images/MhsTB.png
How I WANT the userform to submit the date.
http://ultraimg.com/images/iUdt.png
Like I said, the solution is smacking me right in the face. :banghead:
The code that I'm using the format the date is:
Range("A" & LastRow).NumberFormat = "mmm-yy"
Ignore the columns and rows in the pictures... I'm using "A" to make things easier.