Business days

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to count 10 business days from a date given and output the date which
the 10th business day falls on
 
I need to count 10 business days from a date given and output the date which
the 10th business day falls on

A function I use:

Public Function AdjWorkDays(dteStart As Date, _
intNumDays As Long, _
Optional blnAdd As Boolean = True) As Date
AdjWorkDays = dteStart
Do While intNumDays > 0
If blnAdd Then
'-- Adding WorkDays
AdjWorkDays = AdjWorkDays + 1
Else
'-- Subtracting WorkDays
AdjWorkDays = AdjWorkDays - 1
End If
If Weekday(AdjWorkDays, vbMonday) <= 5 Then
'-- Use the following code if you have a "Holiday" table
' If Weekday(dteCurrDate, vbMonday) <= 5 And
IsNull(DLookup("[Holiday]", "tblHolidays", "[HolDate] = #" &
dteCurrDate & "#")) Then
intNumDays = intNumDays - 1
End If
Loop
End Function

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top