Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show workbook path on Excel title bar

Status
Not open for further replies.

gs99

Programmer
Oct 7, 2001
40
Top line of screen normally shows "Microsoft Excel - workbookname". Is there a way to include the current path? (C:\workbookname). When working with several test versions, need to know which one is on screen. When workbook is protected, the File/Properties is dimmed. Or any other ways to show path automatically?
 
Try putting the following code in the workbook open event:

ActiveWindow.Caption = ActiveWorkbook.FullName

Ken
 
I recommend the ActiveWindow because if you have multiple workbooks open each has its own window with its own caption.

Going for Application.Caption creates a setting for all workbooks which is not what I think you want - although it is what you asked for [smile]

Ken
 
Hi
I would combine the two above and use ActiveWorkbook.Path
It may be splitting hairs but the filename is already there so all you need is the path

Another thing to consider is that if you use the Open event of the workbook the caption will remain the same as the last workbook opened. You might like to use the Activate and Deactivate events of either the Workbook or the window (probably the window) and don't forget to 'kill' the caption
ie ???.Caption = ""

;-) If a man says something and there are no women there to hear him, is he still wrong?
"...Three Lions On A Shirt..."
 
Hi
I would combine the two above and use ActiveWorkbook.Path !!
It may be splitting hairs but the filename is already there so all you need is the path

Another thing to consider is that if you use the Open event of the workbook the caption will remain the same as the last workbook opened. You might like to use the Activate and Deactivate events of either the Workbook or the window (probably the window) and don't forget to 'kill' the caption
ie ???.Caption = ""

;-) If a man says something and there are no women there to hear him, is he still wrong?
"...Three Lions On A Shirt..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top