Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Excel Easy

#1 Excel tutorial on the net Excel Introduction Basics Functions Data Analysis VBA 300 Examples Ask us

Path and FullName Search Entire Site Go

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. Chapter < >
Download path­fullname.xls and add it to "C:\test\" Workbook and Worksheet Object

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.xls. Learn more, it's easy
MsgBox Workbooks("path­fullname.xls").Path
Path and FullName

Close and Open


Result:

Loop through Books and Sheets

Sales Calculator

Files in a Directory

Import Sheets

Programming Charts

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

MsgBox ActiveWorkbook.FullName Download Excel File


Result:
path­fullname.xls

Follow Excel Easy

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

2/8 Completed! Learn more about books and sheets >


Back to Top: Path and FullName | Go to Next Chapter: Range Object

EXCEL EASY • FREE EXCEL HELP • COPYRIGHT (C) 2010­2017 • ALL RIGHTS RESERVED
MICROSOFT EXCEL TUTORIAL | HOW TO USE VBA | EXCEL FORMULAS | DROP­DOWN LIST

You might also like