inabayuta
11/29/2019 - 5:48 AM

シートが存在するか

Function isSheetExist(ByVal sheetName As String) As Boolean
    isSheetExist = False
    
    Dim ws As Worksheet
    For Each ws In Worksheets
        If ws.Name Like sheetName Then
            isSheetExist = True
            Exit For
        End If
    Next ws
End Function