ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Title bar (https://www.excelbanter.com/excel-discussion-misc-queries/23072-title-bar.html)

Tony

Title bar
 
Is there anyway to get the file path into the title bar?

Bob Phillips

here is one way

Public WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub

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

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

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


"Tony" wrote in message
...
Is there anyway to get the file path into the title bar?




Tom Culp

Bob,

How would you get this set as default for all time rather that just being
workbook specific?

"Bob Phillips" wrote:

here is one way

Public WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub

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

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

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


"Tony" wrote in message
...
Is there anyway to get the file path into the title bar?





Bob Phillips

Hi Tom,

It isn't workbook specific as such, it will apply to all workbooks whilst
the App object is in scope, but it will only initiate if that workbook is
opened. A way around this is to put it in the Personal.xls workbook which
always gets loaded at Excel startup.

--

HTH

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


"Tom Culp" wrote in message
...
Bob,

How would you get this set as default for all time rather that just being
workbook specific?

"Bob Phillips" wrote:

here is one way

Public WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub

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

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

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


"Tony" wrote in message
...
Is there anyway to get the file path into the title bar?







Tom Culp

Thanks Bob,

We thought that might work but don't have a lot of VBA experience. Thanks
for the help!!

Bob

"Bob Phillips" wrote:

Hi Tom,

It isn't workbook specific as such, it will apply to all workbooks whilst
the App object is in scope, but it will only initiate if that workbook is
opened. A way around this is to put it in the Personal.xls workbook which
always gets loaded at Excel startup.

--

HTH

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


"Tom Culp" wrote in message
...
Bob,

How would you get this set as default for all time rather that just being
workbook specific?

"Bob Phillips" wrote:

here is one way

Public WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub

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

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

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


"Tony" wrote in message
...
Is there anyway to get the file path into the title bar?








All times are GMT +1. The time now is 06:39 AM.

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