ここでは「C:\excelmemo」直下に「Sample6_20.xlsm」というファイルが格納されています。
ブックのパスを取得する
実行プログラム
1 2 3 4 5 |
Sub Sample6_20_1() MsgBox ThisWorkbook.Path End Sub |
実行後
![](http://excelmemo.com/wp-content/uploads/PIC062001.jpg)
ブックの名前を取得する
実行プログラム
1 2 3 4 5 |
Sub Sample6_20_2() MsgBox ThisWorkbook.Name End Sub |
実行後
![](http://excelmemo.com/wp-content/uploads/PIC062002.jpg)
ブックのフルパスを取得する
実行プログラム
1 2 3 4 5 |
Sub Sample6_20_3() MsgBox ThisWorkbook.FullName End Sub |
実行後
![](http://excelmemo.com/wp-content/uploads/PIC062003.jpg)