ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to change the Excel Title Bar to show the full file path na... (https://www.excelbanter.com/excel-discussion-misc-queries/3172-how-change-excel-title-bar-show-full-file-path-na.html)

lmilkey8855

How to change the Excel Title Bar to show the full file path na...
 
I have a user that would like to see the full path name of a file in Excel in
the Title Bar. Is there any way to change it from just the file name to the
full path name?

Bob Phillips

This will put the path in the Excel title bar.


Put this code into a class module, mine is named clsAppEvents



'--------------------------------------------------------------Option
Explicit

Public WithEvents App As Application


Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
App.Caption = Wb.Path
End Sub


'--------------------------------------------------------------Add this code
to ThisWorkbook code module



'--------------------------------------------------------------Option
Explicit

Dim AppClass As New clsAppEvents


Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub


'--------------------------------------------------------------That's all
there is to it.



--

HTH

RP
(remove nothere from the email address if mailing direct)


"lmilkey8855" wrote in message
...
I have a user that would like to see the full path name of a file in Excel

in
the Title Bar. Is there any way to change it from just the file name to

the
full path name?




Bob Phillips

If you must have what you asked for (:-)), use this instead in the class
module

Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
Wn.Caption = Wb.FullName
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...
This will put the path in the Excel title bar.


Put this code into a class module, mine is named clsAppEvents



'--------------------------------------------------------------Option
Explicit

Public WithEvents App As Application


Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
App.Caption = Wb.Path
End Sub


'--------------------------------------------------------------Add this

code
to ThisWorkbook code module



'--------------------------------------------------------------Option
Explicit

Dim AppClass As New clsAppEvents


Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub


'--------------------------------------------------------------That's all
there is to it.



--

HTH

RP
(remove nothere from the email address if mailing direct)


"lmilkey8855" wrote in message
...
I have a user that would like to see the full path name of a file in

Excel
in
the Title Bar. Is there any way to change it from just the file name to

the
full path name?







All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com