Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function LastWorkday(dDate As Date) As Variant
Dim dLast As Date, iDay As Integer
dDate = DateSerial(Year(dDate), Month(dDate) + 1, 0)
LastWorkday = dDate
Do
iDay = Application.Weekday(LastWorkday)
Select Case iDay
Case 2 To 6
Exit Function
End Select
LastWorkday = LastWorkday - 1
Loop
End Function
YourDate = DateValue("5/6/2008")
if YourDate = LastWorkday(YourDate) then
msgbox "Last workday of month"
end if