How to show the drive letter in the path on the title bar?

J

Jim

I would like to what drive I'm accessing, because I save my worksheets on
several drives on the netwark.

speedy509
 
G

Gord Dibben

Jim

Paste these into the Thisworkbook module

Private Sub Workbook_Open()
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
End Sub


Gord Dibben MS Excel MVP
 
G

Gord Dibben

And if you just want to toggle on/off...............

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

Jim

Paste these into the Thisworkbook module

Private Sub Workbook_Open()
ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
End Sub


Gord Dibben MS Excel MVP

Gord Dibben MS Excel MVP
 
J

Jim

Don't know how to access the module to modify it. Have to leave now. Thanks
for the prompt reply.
 
G

Gord Dibben

Two separate modules involved here depending which code you will use.


Right-click on the Excel Icon left of "File" and select "View Code"

The two Workbook subs are to be pasted in there.

If you want to use the CaptionToggle macro instead.................

Hit CTRL + r to open the Project Explorer.

Select your workbook/project by name and Insert>Module

Paste the CaptionToggle macro into that General Module.

Save the workbook and hit ALT + Q to go back to Excel.

Close the workbook and re-open.


Gord
 
P

paul

in your excel window go to view toolbars and tick web.You now see where you
are!You can remove all theother buttons if you like and just leave the
address bar
 
R

Ragdyer

You really don't have to add an *entire* toolbar to get this functionality.
You can right click in the toolbar and choose "Customize", <Commands> tab,
Scroll down in the left window and click on "Web",
In the right window, click on and drag the "Address" box to either the
toolbar or the menu bar, where's there's usually more room to expand the
box.
While the box is still selected, hover the cursor over a side border, and
when it changes to a double arrow, drag to make the box wider if desired.
 
Top