Other than using a select case statement to calc month names, is there a function that accepts an integer value and returns the name of the corresponding month?
What I need to do is pass an integer value to a function that returns the name of the month (i.e. 1=Jan, 2=Feb etc). The above would work fine if I was passing dates, but not integers.
Function cMon(intMon As Variant) As String
Dim varMon As String
varMon = Str(intMon) & "/" & "00"
cMon = Format(DateValue(varMon), "mmmm")
End Function
Public Function GetMonth(ByVal intMonth As Integer) As String
GetMonth = Left$(Format(CStr(intMonth) & "/" & CStr(intMonth) & "/00", "mmm"), 3)
End Function