Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ntoze
 
Posts: n/a
Default Full path in title bar

This seems to me a good way to do it.

In a new workbook, create a class named AppEvents and put the following
code in it:

Option Explicit

Public WithEvents App As Application

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
showFullName Wb
End Sub

Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook,
ByVal SaveAsUI As Boolean, Cancel As Boolean)
Static inEvent As Boolean

If SaveAsUI Then
If inEvent Then
Exit Sub
End If
inEvent = True

Application.Dialogs(xlDialogSaveAs).Show
showFullName ActiveWorkbook

Cancel = True
inEvent = False
End If
End Sub

Private Sub showFullName(Wb As Workbook)
Dim caption As String
On Error Resume Next

caption = Wb.FullName
' There doesn't seem to be an event for toggling read-only,
' so I think it is better to not display this rather
' than deceive.
' If Wb.ReadOnly Then
' caption = caption & " [Read-Only]"
' End If

Wb.Windows(1).caption = caption
End Sub


Then add a module and put this in:

Dim x As New AppEvents

Public Sub Auto_Open()
Set x.App = Application
End Sub


Then compile and save the workbook as an xla.

Then include it in Tools-Add Ins.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can the full path be shown in the Title Bar? markvi Excel Discussion (Misc queries) 3 November 23rd 05 05:29 PM
Show full path title in title bar? Nor New Users to Excel 4 November 4th 05 06:00 PM
full UNC path in footer muttdaemon Excel Discussion (Misc queries) 1 October 12th 05 06:21 PM
full path of excel file Song Excel Discussion (Misc queries) 2 August 21st 05 06:50 PM
How to change the Excel Title Bar to show the full file path na... lmilkey8855 Excel Discussion (Misc queries) 2 January 6th 05 03:08 PM


All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"