Something like this should work:
Public Function DatePlus10WorkingDays(byVal firstDate as date) as date
dateCount = 0
workingDateCount = 0
while workingDateCount < 10
dateCount = dateCount + 1
if IsWorkingDate(firstDate + dateCount) then
workingDateCount = workingDateCount + 1
end if
wend
DatePlus10WorkingDays = firstDate + dateCount
exit Function
End Function
Public Function IsWorkingDate(byVal testDate as Date) as Boolean
if Weekday(testDate) > 1 and Weekday(testDate) < 7 then
' If you need logic for Holidays you'd include it here. Maybe have a table
of dates
' that are holidays and do a DLookup on that table with the passed date to
see
' if it's in the table. If so, it's not a working date, else it is.
IsWorkingDate = True
else
IsWorkingDate = False
End If
End Function