I can not get the current month.
It seems that getting the current year and day is very simple, as shown below:
MsgBox Year(Date) MsgBox Day(Date) MsgBox Year(Now) MsgBox Day(Now)
How can I show the current month as a number (1, 2, etc.) or a full name?
I could use TODAY()
in the cell and convert it to VBA using something like CurrentMonth = MonthName(Month(Sheet1.Range("A1")))
, but I would like to do it directly in VBA for Excel.
source share