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