Is it possible to get full file path in titlebar?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use a CAD program that show the open file's full path in the active
window's title bar. Very useful for knowing exactly where the file came from.
Is that feature available in any of the MS Office modules?
 
' normal module
Dim clAppEvents As Class1

Sub StartAppEvents()
Set clAppEvents = New Class1
Set clAppEvents.xl = Excel.Application
End Sub

' Class named Class1
Public WithEvents xl As Excel.Application

Private Sub xl_WorkbookActivate(ByVal Wb As Workbook)
xl.Caption = Wb.FullName
'or
'xl.Windows(1).Caption = Wb.FullName
End Sub

run StartAppEvents from a workbook open event. Code could go in any
workbook, eg Personal.xls or an addin.

Regards,
Peter T
 

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

Back
Top