0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【VBA】新規シートを追加する方法

Posted at

今回は、新規シートを追加する方法です。

新規シートを追加して、追加したシートに記載したい時等に必要になります。

↓実演動画
https://youtu.be/shdYt6r5u4o

ソースコードは下記の通りです。

Sub シートを追加する()

    Dim ws1 As Worksheet
    
    Set ws1 = Worksheets.Add
    
End Sub

詳細を説明します。

Dim ws1 As Worksheet

まずは、追加シート用の変数を用意します。

Set ws1 = Worksheets.Add

その変数に「Worksheets.Add」で新規シートを追加することが出来ます。

以上が、新規シートを追加する方法でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?