Topics

Apr 6, 2011

Know the file path of a workbook in Excel 2007

There are few ways that you can do to know the file path of a workbook in Excel 2007. The list below provides the ways:
a. Viewing the Document Properties.
b. Typing the CELL Excel function in a cell.
c. Adding the Document Location command to the Quick Access Toolbar.
d. VBA code to display the file path in the title part of the Excel window.

a. Viewing the Document Properties
Click the Microsoft Office Button and point to Prepare. Click Properties.
You will see the properties of the file like Author, Title, Subject and so on. At the right, you will see Location that displays the file path.

b. Typing the CELL Excel function in a cell
Type =CELL("filename") in any cell and press ENTER key. The file path will be displayed in that cell.

c. Adding the Document Location command to the Quick Access Toolbar
Perform the following steps to add the Document Location command to the QAT:
1. Click the Microsoft Office Button and click Excel Options.
2. From the Excel Options dialog box, click Customize from the left pane.
3. From the right pane, under Choose commands from: click the dropdown box and click Commands Not in the Ribbon. Scroll the list and click Document Location.
4. Click Add >> and click OK.

d. VBA code to display file path in title part of the Excel window
Press ALT + F11 to open the VBA editor. In the Project window, click ThisWorkbook and paste the following code:
    Private Sub Workbook_Open()
             Application.Caption = ActiveWorkbook.FullName
    End Sub

0 comments:

Post a Comment