SSブログ

VBA 現在のMDBファイルのパスの取得 [VBA]

 VBAで、現在のMDBファイルのパスを取得する方法。

’パスのみ
Debug.Print Application.CurrentProject.Path
D:\TEST

’ファイル名のみ
Debug.Print Application.CurrentProject.Name
SAMPLE.mdb

’パスとファイル名
Debug.Print Application.CurrentProject.FullName
D:\TEST\SAMPLE.mdb

’パスとファイル名
Debug.Print Application.CurrentDb.Name
D:\TEST\SAMPLE.mdb


この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。