Skip to main content

Hello everyone,

 

Is there a way to insert a month's name instead of the number of the number?

 

For example i'm currently using this to enter the current number of the month:

CDate = Format(Month(Date), "0")

If the Month is January, can I just have it write January instead of 1?

 

In addition, if this can be done, is it possible to use the 1 to have it name the next month?


#Rumba

Hello everyone,

 

Is there a way to insert a month's name instead of the number of the number?

 

For example i'm currently using this to enter the current number of the month:

CDate = Format(Month(Date), "0")

If the Month is January, can I just have it write January instead of 1?

 

In addition, if this can be done, is it possible to use the 1 to have it name the next month?


#Rumba
I have used both of these options below:

Dim strMonthName as String

' Full month name
strMonthName = MonthName(Month(Date))

or

' Full month name
strMonthName = Format(Date, "mmmm")

Hello everyone,

 

Is there a way to insert a month's name instead of the number of the number?

 

For example i'm currently using this to enter the current number of the month:

CDate = Format(Month(Date), "0")

If the Month is January, can I just have it write January instead of 1?

 

In addition, if this can be done, is it possible to use the 1 to have it name the next month?


#Rumba
Thank you rCartner, this is exactly what I needed.

Hello everyone,

 

Is there a way to insert a month's name instead of the number of the number?

 

For example i'm currently using this to enter the current number of the month:

CDate = Format(Month(Date), "0")

If the Month is January, can I just have it write January instead of 1?

 

In addition, if this can be done, is it possible to use the 1 to have it name the next month?


#Rumba
To get the next month, you would need to use the MonthName() function but will need something to catch if the next month is January.

If Month(Date) < 12 Then
strMonthName = MonthName(Month(Date) 1)
Else
strMonthName = MonthName(1)
End If