Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can the full path be shown in the Title Bar? | Excel Discussion (Misc queries) | |||
Show full path title in title bar? | New Users to Excel | |||
full UNC path in footer | Excel Discussion (Misc queries) | |||
full path of excel file | Excel Discussion (Misc queries) | |||
How to change the Excel Title Bar to show the full file path na... | Excel Discussion (Misc queries) |