Is there a way to display complete path of the document and not just the file name in the Excel title bar ?
e.g. I would like to see C:\MyExcelFiles\MonthlyBudget.xlsx in Excel title bar instead of just MonthlyBudget.xlsx
In Excel, there is no setting/straight way for us to display the full path in title bar, however we can apply following VBA code to achieve it:
Solution I: [Works only for 1 Excel File]
If you want to display Full Path in Title Bar only for a selected Excel Files
Copy below macro to ThisWorkbook module in the Excel File, save the file, and reopen the file to see the Full Path in Title Bar.
Private Sub Workbook_Open() ActiveWindow.Caption = ActiveWorkbook.FullName End Sub
Solution II: [Works as Default for all Excel files]
If you want to display Full Path in Title Bar for every Excel Files or by default
Copy below macro to ThisWorkbook module in your personal.xls file in XLStart folder, save the file, exit Excel Application [Close all excel files], and open any Excel file, now you will see the full path for all Excel files in title bar.
Public WithEvents xlApp As Excel.Application Private Sub Workbook_Open() Set xlApp = Application End Sub Private Sub Workbook_Close() Set xlApp = Nothing End Sub Private Sub xlApp_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window) Wn.Caption = Wb.FullName End Sub
How to add Macro to your Excel file
- Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
- In the pop-up window, double-click on ThisWorkbook Module, then paste the given VBA code into the module.
Please let me know your thoughts in the comments section below.
Hope this helps! Happy Exelling!
Recommended for you:
- 100+ Quick Excel Tips
- Excel Data Entry Tips and Techniques
- 10 Helpful Excel PivotTable Tips for Quick and Efficient Data Analysis
- Consolidate Data from Multiple Worksheets into a Master Worksheet in Excel using VBA
- Ten Tips For Coding Excel VBA Macros
- How to Unprotect an Excel Sheet Without Password
- 14 Advanced Excel Tips and Tricks for Basic to Intermediate Users