Excel VBA - How to Get Excel File Path

Опубликовано: 06 Октябрь 2024
на канале: InAnOffice
15,085
71

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