kyddrivers
Board Regular
- Joined
- Mar 22, 2013
- Messages
- 64
- Office Version
- 365
- Platform
- Windows
I am writing a script that will save files to a new monthly directory for 3 months in advance.
Directory naming convention is this: 04-April 2020
I can get the year and I can get the month name. I can get the month number to return 4, but I need 04.
FY returns 2020
FM returns April
FMN returns 4
Thanks in advance for your assistance!
Directory naming convention is this: 04-April 2020
I can get the year and I can get the month name. I can get the month number to return 4, but I need 04.
VBA Code:
FY = Year(Date)
FM = MonthName(Month(DateAdd("m", 3, Date)))
FMN = Month(DateAdd("m", 3, Date))
FY returns 2020
FM returns April
FMN returns 4
Thanks in advance for your assistance!