Excel VBA - Learn how to get the path of the current file
The code used in this video:
Sub GetPath()
Dim pathWithFileName As String
Dim pathWithoutFileName As String
pathWithFileName = Application.ActiveWorkbook.FullName
pathWithoutFileName = Application.ActiveWorkbook.Path
MsgBox pathWithFileName
MsgBox pathWithoutFileName
End Sub