I'm trying to make a date interval legend in a userform. I don't have any issue with getting values into text boxes, I just can't rap my head around making the updating date interval into code or sheet formulas, and causing the code or formulas to update every new pay period.
Example:
I use four intervals bases on the pay weeks. For example this month pay weeks are 7/8 and 7/22, 14 days apart or two weeks. So four intervals into the future would yield this:
1Due - 7/8 to 7/22
2Due - 7/22 to 8/5
3Due - 8/5 to 8/19
4Due - 8/19 to 9/2
When 7/8 comes the legend above would update to the following:
1Due - 7/22 to 8/5
2Due - 8/5 to 8/19
3Due - 8/19 to 9/2
4Due - 9/2 to 9/16
Then when 7/22 comes the legend would be:
1Due - 8/5 to 8/19
2Due - 8/19 to 9/2
3Due - 9/2 to 9/16
4Due - 9/16 to 9/30
and so on.
I prefer to get this working in VBA, but I am fine with using data in a worksheet if this is a simpler task as I have a worksheet for data information to be used elsewhere in the workbook. This doesn't seem like it would be a very difficult task, but I do not have a strong grasp on dates in VBA or formula, other then adding and subtracting dates. If required the first pay day of this year was 1/7/10.
Any help is appreciated.
Example:
I use four intervals bases on the pay weeks. For example this month pay weeks are 7/8 and 7/22, 14 days apart or two weeks. So four intervals into the future would yield this:
1Due - 7/8 to 7/22
2Due - 7/22 to 8/5
3Due - 8/5 to 8/19
4Due - 8/19 to 9/2
When 7/8 comes the legend above would update to the following:
1Due - 7/22 to 8/5
2Due - 8/5 to 8/19
3Due - 8/19 to 9/2
4Due - 9/2 to 9/16
Then when 7/22 comes the legend would be:
1Due - 8/5 to 8/19
2Due - 8/19 to 9/2
3Due - 9/2 to 9/16
4Due - 9/16 to 9/30
and so on.
I prefer to get this working in VBA, but I am fine with using data in a worksheet if this is a simpler task as I have a worksheet for data information to be used elsewhere in the workbook. This doesn't seem like it would be a very difficult task, but I do not have a strong grasp on dates in VBA or formula, other then adding and subtracting dates. If required the first pay day of this year was 1/7/10.
Any help is appreciated.