Function SheetExists ShName As String As Boolean Dim Sh As Worksheet I

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
Function SheetExists(ShName As String) As Boolean
Dim Sh As Worksheet
' Initial conditions
SheetExists = False
For Each Sh In ActiveWorkbook.Sheets
If Sh.Name Like ShName Then
SheetExists = True
Set Sh = Nothing
Exit Function
End If
Next Sh
End Function