Can the full path be shown in the Title Bar?

G

Guest

Is there a way in Excel 2003 and Windows XP to have the application's Title
Bar show the full path of the document and not just the file name?
 
D

Dave Peterson

You could use an application event that monitors when you change windows.

If you want to try:

You could use this in a new workbook (or add to your personal.xls file).

This goes under the ThisWorkbook module.

Option Explicit
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

If you save that workbook in your XLStart folder, then each time excel opens,
this workbook will open.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
G

Gord Dibben

mark

Only through VBA and does not stick through sessions so has to be reset.

Private Sub Workbook_Open()
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
End Sub

Paste these Subs to the ThisWorkbook module.

Could also be placed in Personal.xls or an Add-in that loads when Excel is
started.


Gord Dibben Excel MVP
 
G

Guest

Thanks to you both
--
- markvi


Gord Dibben said:
mark

Only through VBA and does not stick through sessions so has to be reset.

Private Sub Workbook_Open()
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
End Sub

Paste these Subs to the ThisWorkbook module.

Could also be placed in Personal.xls or an Add-in that loads when Excel is
started.


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top