OaklandJim
Well-known Member
- Joined
- Nov 29, 2018
- Messages
- 833
- Office Version
- 365
- Platform
- Windows
I have a workbook with various worksheets including month-specific ones. They are named based on the "mmm" format, so Jan, Feb, Mar, etc. I'd like to put them in chron order, so starting with Jan and ending with Dec. Dec would be the last sheet, Nov next to last, etc. There may not be a sheet for every month. Below is an array with month names in it so you don't have to type them in.
VBA Code:
Dim asMonths() As String
ReDim asMonths(12)
asMonths(1) = "Jan"
asMonths(2) = "Feb"
asMonths(3) = "Mar"
asMonths(4) = "Apr"
asMonths(5) = "May"
asMonths(6) = "Jun"
asMonths(7) = "Jul"
asMonths(8) = "Aug"
asMonths(9) = "Sep"
asMonths(10) = "Oct"
asMonths(11) = "Nov"
asMonths(12) = "Dec"