Hi Excel Userform Experts,
Issue with Dates from a Userform to send to Sheet1.
I have a two question on a Userform which been hampering the brains out a bit now. Using Excel 2013 for a database, where I'm trying to send a date from Textbox to sheet1 Column 'M'. I need to have cells formatted in Sheet1 Column 'M', from cell 9 to cell 450 in "dd/mmm/yyyy".
I'm entering a short date in the textbox as "dd/mm/yy".
I used this vba code formula to send date to Sheet1 which worked perfect in a single cell only:
Sheet1.Range("M9").Value = Format(TextBox1.Value, "dd /mmm/yyyy")
This worked very well for the first single cell, but when I changed the formuls to
Sheet1.Range("M9:M450").Value = Format(TextBox1.Value, "dd /mmm/yyyy")
This worked as well in a way but it changed ALL the cells in the Column 'M' to the same date.
How can I format the Column "M' cells indivigually.
2.- There other question is I have a column which needs to add "Years" to a date to make 'Due Date',
I used this formula for each cell in Column L were I need the due date to go in Sheet1 for each cell:-
=DATE(YEAR(H9) + L9, MONTH(H9), DAY(H92))
'H9' is the install date and 'L9' is the next number of years the result goes into cell 'N9' as the Due Date.
I formatted Column 'N' with the above vba code but when I enter the date in the Userform textbox it doesn't work, I also need this 'N9 to N1000' to be formatted in 'dd/mmm/yyyy'
I will upload two samples
I thank you in advance for any assistance in this issue.