fluxcapacitr609
New Member
- Joined
- Feb 21, 2018
- Messages
- 24
This code works great. It creates a new sheet every month. I just want it to stop adding once we get to 2019. Any Ideas?
Code:
Sub AddMonthWkst()
Dim ws As Worksheet
Dim strName As String
Dim bcheck As Boolean
On Error Resume Next
strName = Format(Date, "mmm_yyyy")
bcheck = Len(Sheets(strName).Name) > 0
If bcheck = False Then
Set ws = Worksheets.Add(Before:=Sheets(1))
ws.Name = strName
End If
End Sub