Function Dates Times Class

Calendar

Produce a calendar for a month that resembles the output of the UNIX cal command.

Signature (Visual Basic / VBA)

Public Function Calendar( _
      ByVal vYear As Variant _
    , ByVal vMonth As Variant _
    ) As Variant

Code Example

    Debug.Print Calendar(1999, 11)
       November 1999
    Su Mo Tu We Th Fr Sa
        1  2  3  4  5  6
     7  8  9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30

Parameters

Parameter Description
vYear Must use the full four-digit year; cannot use 96, for example, to mean 1996. Function returns Null if vYear is Null or cannot be interpreted as an integer number.
vMonth Month in the year vYear. Function returns Null if vMonth is Null or cannot be interpreted as an integer number.

Notes & Version History

v2.0 Addition This function is new to this version of Entisoft Tools.