シートの追加 |
ActiveWorkbook.Worksheets.Add After:=Worksheets("未契約リスト") ActiveSheet.Name = "Work" |
---|---|
シートの選択 |
Windows(DB_name).Activate Sheets("当月データ").Select |
シートの名前付け |
Sheets("Sheet1").Select Sheets("Sheet1").Name = "当月データ" |
シート間のデータのコピー |
Range("A1:S" & MaxRow_S).Select Range("A" & MaxRow_S).Activate Selection.Copy Sheets("Sheet2").Select Range("A1").Select ActiveSheet.Paste Application.CutCopyMode = False |
Sheet1の前にコピー |
Windows(InBook).Activate Sheets(Tab_name).Select Sheets(Tab_name).Copy Before:=Workbooks(A_name).Sheets(1) |
アクティブシートの削除 |
Application.DisplayAlerts = False ActiveSheet.Delete Application.DisplayAlerts = True |
指定シートの削除 |
Application.DisplayAlerts = False Worksheets("Sheet1").Delete Application.DisplayAlerts = True |
Dim ws As Worksheet flag = False For Each ws In Worksheets If ws.Name = Sheet_name Then flag = True Exit For End If Next ws