MonthName Function [VBA]

The MonthName function returns the localized month name of a specified month number.

рдЪреЗрддрд╛рд╡рдиреА рдкреНрд░рддрд┐рдорд╛

This function or constant is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


Syntax:


        MonthName(Month as Integer [,Abbreviate as Boolean])
    

Return value:

String

Parameters:

Month: Value from 1 to 12, January to December, whose localized month name need to be returned.

Abbreviate: Optional. A Boolean value that indicates if the month name is to be abbreviated.

рддреНрд░реБрдЯрд┐ рд╕рдЩреНрдХреЗрддрд╣рд░реВ

5 рдЕрд╡реИрдз рдХрд╛рд░реНрдп-рд╡рд┐рдзрд┐ рдХрд▓

Example:


        REM  *****  BASIC  *****
        Option VBASupport 1
        Sub Example_MonthName
         Dim mBirthday as Integer
         mBirthday = 1
         print mBirthday &" "& MonthName(mBirthday,False)
        End Sub