BellKev,
First, I apologize for my short answers to your real questions!
Les is a skilled contributor, and his advice is always sound! But, you still need the logic to calculate your target date.
Logically, the only way to take a starting date and add a number of
business days to that to come up with a calculated end date is to create a loop. Which is probably best handled with a function.
The hotlinks posted calculate the number of business days between two dates - not exactly what you're looking for, but similar logic is required.
Think of the logic you need:
Start
Load beginning date into a variable (vDate)
Define Counter variable (vCounter)
Loop
Is vDate Sat or Sun?
Yes (need to skip counting this date)
Advance vDate (vDate + 1)
Go to loop
No
Add 1 to vCounter
Is vCounter variable = to number of days specified?
Yes
I'm done - vDate contains the target date
No
Advance vDate (vDate +1)
Go to loop
End
That only allows for Saturdays and Sundays, not holidays.
The actual Visual Basic instructions may benefit from built-in functions (e.g., Workday), but the loop is required.
You CAN accomplish what you want...
It WILL probably take more work than you estimated.
HTH,
Bob
![[morning] [morning] [morning]](/data/assets/smilies/morning.gif)