Sub yoursub()
Dim ShName As String
'other code
ShName = "Work10"
If WksExists(ShName) Then
'do your operations when it exists
MsgBox "Worksheet exists", 48, "Title"
Else
'do your operations when it doesn't exists
MsgBox "nope"
End If
'code
End Sub
Function WksExists(wksName As Variant) As Boolean
On Error Resume Next
WksExists = CBool(Len(Worksheets(wksName).Name) > 0)
End Function