WorkbookSheetExists

by

in
Public Function WorkbookSheetExists( _
    wb As Workbook, _
    strSheetName As String _
) As Boolean
    Dim ws As Worksheet
    WorkbookSheetExists = False
    For Each ws In wb.Sheets
        If ws.Name = strSheetName Then
            WorkbookSheetExists = True
        End If
    Next ws
End Function

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *