Ive got a template sheet that ive hidden, im trying to copy it and assign a new name to the sheet according to what year the user types in. the problem im having is that when the tab is hidden the copy remains hidden and when I input a visible line everything goes wrong.
Help Please
Sub New_Condition_Survey()
Dim SurveyYear As String
SurveyYear = InputBox("What Year will the survey commence?", "Commencement Year")
If SurveyYear = "" Then Exit Sub
If IsNumeric(SurveyYear) Then
If SurveyYear > 0 < 3000 Then
ActiveWorkbook.Sheets("Condition Survey Template").Copy _
after:=ActiveWorkbook.Sheets("Condition Survey Template")
ActiveSheet.Name = SurveyYear & " - " & SurveyYear + 5 & " Condition Survey"
ActiveSheet.Visible = True
Else
MsgBox "Invalid Year"
End If
End If
End Sub
Bookmarks