![]() |
#4
|
||||
|
||||
![]()
Even simpler:
Code:
Sub InsertNewWorksheetAndName() Application.ScreenUpdating = False With ActiveWorkbook .Sheets.Add After:=Worksheets(.Worksheets.Count) .Sheets(.Worksheets.Count).Name = Format(DateAdd("M", -1, Now()), "YYYY-MM") End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
monthnow nowmonth mm |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
LearnerExcel | Excel | 4 | 02-08-2018 10:49 AM |
Having number's digits together | mohsen.amiri | Word | 0 | 06-23-2017 01:20 AM |
![]() |
laucn | Excel | 2 | 06-08-2015 07:50 AM |
Separate the digits into 3 combinations | Jasa P | Word VBA | 1 | 08-19-2012 11:04 PM |
![]() |
Glynda | Mail Merge | 1 | 04-08-2011 12:17 AM |