RP1America
Technical User
Greetings!
I am looking for a way to automate displaying 'payments due back' dates within a letter.
I have a userform field that asks the user for the 'number of payments due back'. Another section of the userform asks for the 'date of first payment due back' (3 numeric textboxes; MM, DD, YYYY).
I am setting up an IF statement so that if there are 4 or more payments due back, the text will show "(date of first payment due back) through (date of last payment due back)". In order to do this, I need a way to calculate what the date of last payment due back would be (i.e. if date of first payment due back is 11/01/2008 and there are 4 payments due back, the date of last payment due back would be 02/01/2009).
I need to be able to basically calculate what month and year it would be (as day will always remain the same) even if there were 50+ or 100+ payments due back.
Any suggestions?
Thanks!!
I am looking for a way to automate displaying 'payments due back' dates within a letter.
I have a userform field that asks the user for the 'number of payments due back'. Another section of the userform asks for the 'date of first payment due back' (3 numeric textboxes; MM, DD, YYYY).
I am setting up an IF statement so that if there are 4 or more payments due back, the text will show "(date of first payment due back) through (date of last payment due back)". In order to do this, I need a way to calculate what the date of last payment due back would be (i.e. if date of first payment due back is 11/01/2008 and there are 4 payments due back, the date of last payment due back would be 02/01/2009).
I need to be able to basically calculate what month and year it would be (as day will always remain the same) even if there were 50+ or 100+ payments due back.
Any suggestions?
Thanks!!
Code:
Dim strpdbtext As String
If numpytsdueback <= "4" Then strpdbtext = " payments, due " _
+ strpdbmonth + " " + pdbdd + ", " + pdbyyyy + " through " + ????