path in title bar

J

joe

Some time ago I found instructions to show the entire path
in the title bar of excel, instead of just showing the
workbook name. I think it was an application level event
but am not sure. I had it in my personal.xls file but my
computer crashed and I lost it. Does anyone have those
instructions?
 
B

Bob Phillips

Joe,

This may be what you are referring to

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

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

joe.

Exactly what I wanted. Thanks very much.
Joe
-----Original Message-----
Joe,

This may be what you are referring to

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

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)




.
 

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