Function Dates Times Class

LastBusinessDayOfMonth

Returns the last weekday in the month given a date value. Same as LastWeekdayOfMonth , but accepts arguments differently.

Signature (Visual Basic / VBA)

Public Function LastBusinessDayOfMonth( _
    ByVal vDate As Variant _
    ) As Variant

Code Example

    LastDayOfMonth(#3/15/1996#) = #3/31/1996#
    Format$(#3/31/1996#, "ddd") = "Sun"
    LastBusinessDayOfMonth(#3/15/1996#) = #3/29/1996#
    Format$(#3/29/1996#, "ddd") = "Fri"
    LastBusinessDayOfMonth(#4/10/1996#) = #4/30/1996#
    Format$(#4/30/1996#, "ddd") = "Tue"
    LastDayOfMonth(#4/10/1996#) = #4/30/1996#

Parameters

Parameter Description
vDate The date whose month and year components are examined to determine the last business day of the month. Function returns Null if vDate is Null or cannot be fixed up to a Date. Function assumes that the business days are Monday through Friday. When the date falls on a weekend, the function returns the date of the previous Friday.