Use Application.ActiveWorkbook.Path
for just the path itself (without the workbook name) or Application.ActiveWorkbook.FullName
for the path with the workbook name.
CurDir()
is also very useful in some circumstands
For example,
When you open an Excel document D:\db\tmp\test1.xlsm
:
CurDir()
returnsC:\Users\[username]\Documents
ActiveWorkbook.Path
returnsD:\db\tmp
So CurDir()
has a system default and can be changed.
ActiveWorkbook.Path
does not change for the same saved Workbook.