Table of Contents

Path and FullName

The Path property in Excel VBA returns the complete saved path to the workbook (Excel file). The FullName property in Excel VBA returns the complete saved path including the name of the workbook.

Download path-fullname.xlsm and add it to “C:test”

Place a command button on your worksheet and add the following code lines:

1. The following code line returns the complete path to path-fullname.xlsm.

MsgBox Workbooks(“path-fullname.xlsm”).Path

Result:

Excel VBA Path Property Result

2. The following code line returns the complete path including the name of the active workbook.

MsgBox ActiveWorkbook.FullName

Result:

Excel VBA FullName Property Result

For a practical example of the FullName property see our example program Create a Footer Before Printing.

Leave A Comment

Excel meets AI – Boost your productivity like never before!

At Formulas HQ, we’ve harnessed the brilliance of AI to turbocharge your Spreadsheet mastery. Say goodbye to the days of grappling with complex formulas, VBA code, and scripts. We’re here to make your work smarter, not harder.

Related Articles

The Latest on Formulas HQ Blog