Does anyone know how to make this work?
Sub Test1 ()
Dim ShtName As String
Dim ShtError As String
If IsError(Sheets(ShtName).Copy) = True Then
ShtError = ShtName & " cannot be copied due to it not existing"
GoTo Quit2:
Else
Sheets(ShtName).Copy
MsgBox(Shtname & " successfully copied")...