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]Workbooks()の使い方

Last updated at Posted at 2021-07-25

■Workbooks()オブジェクトについて
・ブックに対して操作するもの
・開いているすべてのブックは、Workbooksコレクションに含まれる

■変数の宣言
Dim book As Workbook

■ブックの指定
・「excelbook」という名前のブックを指定する場合
Set book = Workbooks("ファイル名")
とする。

■Workbookのプロパティとメソッド
□プロパティ
・Name:名前
・Path:保存パス
・FullName:保存パス+名前
・Sheets:すべてのシート
・Worksheets:すべてのワークシート
□メソッド
・Close:閉じる
・Save:上書き保存
・SaveAs:名前を付けて保存

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?