On my userform, I have a text box ("txt2") that asks the user to enter a date. I already have an IsDate sub running that ensures the input is in any date format, and then the excel column (H, column 8) the data is transferred to is formatted as date: mm/dd/yy - so all the dates entered should be formatted the same.
What I want at the time of data transfer though is to extract (separately) the day, the month and the year from the date that the user input (it could be different than today's date). I'm thinking this might be easier to extract from the destination cell (as it is already formatted) but maybe not since that cell will be the next empty row every time the userform transmits the data??
Here is my code:
Thanks!![]()
With ws3 emptyRow = WorksheetFunction.CountA(ws3.Range("$C:$C")) +1 .Cells(emptyRow, 8).Value = txt2.Value .Cells(emptyRow, 10).Value = DAY???? .Cells(emptyRow, 11).Value = MONTH???? .Cells(emptyRow, 12).Value = YEAR????
Bookmarks