SMALL

Sub CrtSheet()

'Updated by ExtendOffice 20181009

    Dim xName As String

    Dim xSht As Object

    On Error Resume Next

    xName = InputBox("Please enter a name for this new sheet ", "Kutools for Excel")

    If xName = "" Then Exit Sub

        Set xSht = Sheets(xName)

        If Not xSht Is Nothing Then

            MsgBox "Sheet cannot be created as there is already a worksheet with the same name in this workbook"

            Exit Sub

            End If

            Sheets.Add(, Sheets(Sheets.count)).Name = xName

        End Sub

알림창 없이 추가시에는 아래처럼

Sub CrtSheet2()

            Sheets.Add(, Sheets(Sheets.count)).Name = "시트이름"

        End Sub

 

LIST
블로그 이미지

SeoHW

,