I used to use Aut
pen for this and I know it interfered
with me in some way. In any I'd rather have a shorter
name that is correct than a full pathname that is incorrect.
If you have two workbooks open as you switch between them
one of them will be incorrectly marked on the title bar if you
are viewing the spreadsheet maximized within the Excel window.
The following will work better and would be placed in "ThisWorkbook"
Private Sub Workbook_WindowActivate(ByVal Wn As Window)
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub
I will change my pathname.htm web page to show the above
a a preference to Aut
pen. I tried using an deactivate as well
but it seemed to gain nothing. And the title bars of the worksheet when normal or whater not maximized is called then both had
their own correct pathnames regardless of which was active. (both title bars as well
as the Excel window titlebar all being visible)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
Gord Dibben said:
Greg
No setting, but code.......copy/paste the code below into the ThisWorkbook
Module of your workbook.
Private Sub Workbook_Open()
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub
Right-click on the Excel logo at top left of Menubar and select "View Code".
Paste in there.
Save the workbook.
OR....use this Toggle macro.
Sub CaptionToggle()
' toggles title bar between document name and full path
If ActiveWindow.Caption = ActiveWorkbook.Name Then
ActiveWindow.Caption = ActiveWorkbook.FullName
Else: ActiveWindow.Caption = ActiveWorkbook.Name
End If
End Sub
Gord Dibben Excel MVP