Hi all - its been years since I last had to create a userform or even touch VBA but I've been tasked with creating a workbook for my wife so that she can enter all her accounts data to make it easier for her to do her tax returns next year.
I've created an expense form - which so far works fine but I'm really struggling to work out an easy way for her to enter two dates on the form.
(Start Date - txtStart & End Date - txtEnd)
What I'd like to know is how do I code the two text boxes so that when data is entered it is automatically converted to the date format 'DD/MM/YYYY'
and once the dates have been entered I also need the number of days calculated with the result shown in another text box 'txtTotalDays' as a number i.e. if the start date is 10/10/2023 and the end date is 20/10/2023 the the total days would be 10. Once this form is submitted (by a button) the data populates the spreadsheet called 'Expenses'.
(On the spreadsheet I have formatted to relevent cells as a date).
I've been trying to work out how to do this now for two days and losing the will to live with google lol so would really appricate some advice please or a solution would be ideal !
Many thanks Paul
I've created an expense form - which so far works fine but I'm really struggling to work out an easy way for her to enter two dates on the form.
(Start Date - txtStart & End Date - txtEnd)
What I'd like to know is how do I code the two text boxes so that when data is entered it is automatically converted to the date format 'DD/MM/YYYY'
and once the dates have been entered I also need the number of days calculated with the result shown in another text box 'txtTotalDays' as a number i.e. if the start date is 10/10/2023 and the end date is 20/10/2023 the the total days would be 10. Once this form is submitted (by a button) the data populates the spreadsheet called 'Expenses'.
(On the spreadsheet I have formatted to relevent cells as a date).
I've been trying to work out how to do this now for two days and losing the will to live with google lol so would really appricate some advice please or a solution would be ideal !
Many thanks Paul