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
'Excel' 카테고리의 다른 글
EXCEL vba 특정셀 찾아서 변수(주소or셀위치)저장 (0) | 2021.11.15 |
---|---|
EXCEL 매크로 지정영역 선택 (0) | 2021.11.15 |
excel(엑셀) vba 매크로 확인창 미출력 (0) | 2021.11.15 |
excel 조건 만족하지 않는 행 삭제 (매크로) (0) | 2021.10.26 |