Here's a "brute-force" function (found in another newsgroup) for doing what
you seek:
Public Function NumberOfWeekDays(datStart As Date, datEnd As Date) As Long
Dim lngNumber As Long, lngTotalDays As Long, lngCount As Long
lngTotalDays = datEnd - datStart
lngNumber = 0
For lngCount = 1 To lngTotalDays
If DatePart("w", datStart + lngCount, vbMonday) < 6 Then lngNumber =
lngNumber + 1
Next lngCount
NumberOfWeekDays = lngNumber
End Function
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.