ワークシートの追加 | ワークシートの削除 |
ワークシートを自動で追加したい |
Sub Sample01() Dim i As Integer For i = 1 To 12 Worksheets.Add After:=ActiveSheet ActiveSheet.Name = i & "月" Next i End Sub |
Sub Sample02() Dim i As Integer Dim ShName As Variant ShName = Array("福岡県", "佐賀県", "長崎県", "熊本県", "大分県", "宮崎県", "鹿児島県") For i = LBound(ShName) To UBound(ShName) Worksheets.Add After:=ActiveSheet ActiveSheet.Name = ShName(i) Next i End Sub |