Add worksheets at end
Pls Try as follows :-
Sub AddMonthWS()
Dim myMonth As String
Dim Sht As Worksheet
myMonth = Application.InputBox(Prompt:="Enter the current month name:",
Title:="Month", _
Type:=2)
On Error Resume Next
Set Sht = ActiveWorkbook.Worksheets(myMonth)
On Error GoTo 0
If Sht Is Nothing Then
Worksheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = myMonth
End If
End Sub
|