Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Path in title bar

1 view
Skip to first unread message

Barbara Waller

unread,
Apr 28, 2002, 8:13:34 PM4/28/02
to
I know I saw this before but I can't find it now that I need it. I think it
was an AutoOpen macro.

I need to be able to display the full file name (with path) in the title
bar. Can anyone re-post the code, I thought Peo had posted it before but
couldn't find it using Search.

I'm using Excel 97. If I should repost in excel.macros let me know. Thanks
for the help.

--
Barbara Waller
Worcester, Massachusetts


David McRitchie

unread,
Apr 29, 2002, 12:06:46 AM4/29/02
to
Hi Barbara,
See Pathname look for titlebar
http://www.mvps.org/dmcritchie/excel/pathname.htm
I believe Excel 2002 make this an option.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"Barbara Waller" <b...@nospam.com> wrote in message news:ulJ4SKx7BHA.2152@tkmsftngp02...

Barbara Waller

unread,
Apr 29, 2002, 12:09:30 PM4/29/02
to
David this is the code I wanted. However, if I put the macro in
personal.xls I get the following error message:
Object variable or With block variable not set (Error 91)

If I put it in a worksheet in the xlstart directory it works OK. Is this
the way it has to be? I'd rather have it in personal.xls because it looks
cleaner. I'm working with Excel97.


--
Barbara Waller
Worcester, Massachusetts

"David McRitchie" <dmcri...@msn.com> wrote in message
news:eTtqOPz7BHA.1364@tkmsftngp02...

David McRitchie

unread,
Apr 29, 2002, 12:24:23 PM4/29/02
to
Hi Barbara,
You don't want to put your workbook into XLSTART, which
would cause it to be opened each time Excel starts.

I knew I didn't like the code and removed it. But in hindsight
I think the problem is that you would have to put that into
each workbook and it still could be incorrect as you open
and close other workbooks. Which is I guess why I
switched to using something you run when needed.

Sub WhereAmI()
MsgBox ActiveWorkbook.FullName
End Sub


HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"Barbara Waller" <b...@nospam.com> wrote in message news:#d6fdg57BHA.1824@tkmsftngp05...

Barbara Waller

unread,
Apr 29, 2002, 12:55:13 PM4/29/02
to
Thanks David. I might use the WhereAmI but I really wanted it to be like
the macro I have for Word. I administer a network and wanted the
workstations to show the full path of files without user intervention.

It must be another one of the differences between Word and Excel, like the
filename \p option in Word that is dynamic and in Excel you have to do VBA!
Unless you are running 2002 from what I've read.
--

Thanks again.


--
Barbara Waller
Worcester, Massachusetts

"David McRitchie" <dmcri...@msn.com> wrote in message

news:OEiMSr57BHA.1364@tkmsftngp04...

Dave Peterson

unread,
Apr 29, 2002, 7:01:30 PM4/29/02
to
One more option is to show the web toolbar (or just add the Address command from
the web toolbar to your favorite custom toolbar).

Tools|customize|toolbars tab (enable Web)

or

Tools|customize|commands|Web Category|drag Address to your favorite spot.

But I have seen it get confused and forget what's active. (I gave up on it, but
you might have better luck than I did.)

--

Dave Peterson
ec3...@msn.com

Barbara Waller

unread,
Apr 30, 2002, 4:49:15 PM4/30/02
to
For us the address bar it's not a great solution, most of the addresses are
too long to display fully. I think I'll just live with them saving their
files in the wrong directory. No, not really. I will probably use the
Book1.xls option in xlstart. It's my least favorite but it does exactly
what I want.
--

Thanks for the help.
--
Barbara Waller
Worcester, Massachusetts

"Dave Peterson" <ec3...@msn.com> wrote in message
news:3CCDD0CA...@msn.com...

Dave Peterson

unread,
Apr 30, 2002, 7:12:13 PM4/30/02
to
You meant personal.xls (instead of book1.xls), right?

Maybe you could give David McRitchie's WhereAmI code a shortcut key. (I use
ctrl-Q).

Then remind the user to hit ctrl-Q if they have trouble remembering where they
are.

=========
Or you could do something like this:

In your personal.xls file, hit alt-f11 to go to the VBE.

Click on Insert
and choose Class Module
Make sure it's called Class1 (we'll refer to it later by that name.

Paste this in:

Option Explicit
Public WithEvents xlApp As Excel.Application
Private Sub xlApp_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
Wn.Caption = Wb.FullName
End Sub


---------
Now rightclick on the ThisWorkbook object and select view code. (You might have
to hit ctrl-R to see the project explorer.)

Paste this in:

Option Explicit
Dim myTitle As Class1
Private Sub Workbook_Open()
Set myTitle = New Class1
Set myTitle.xlApp = Application
End Sub
Private Sub workbook_close()
Set myTitle.xlApp = Nothing
End Sub

--

Dave Peterson
ec3...@msn.com

David McRitchie

unread,
May 1, 2002, 12:23:25 AM5/1/02
to
I guess there are two things I use

File, Properties

and

Creating a footing which is actually the main
focus of
http://www.mvps.org/dmcritchie/excel/pathname.htm
and then using Print Preview

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"Barbara Waller" <b...@nospam.com> wrote in message news:et7MchI8BHA.1364@tkmsftngp04...

Barbara Waller

unread,
May 1, 2002, 7:30:20 PM5/1/02
to
I've never used the Class Module. I'll try working with it and see what it
does. I'm not sure I understood everything as I read it, but working with
it usually clears up the confusion for me.
--
Thanks again.
Barbara

"Dave Peterson" <ec3...@msn.com> wrote in message

news:3CCF24CD...@msn.com...

Dave Peterson

unread,
May 1, 2002, 7:45:22 PM5/1/02
to
Boy, I wish that were true for me (about the confusion)!

But you may want to read about event programming at Chip Pearson's site:

http://www.cpearson.com/excel/AppEvent.htm

--

Dave Peterson
ec3...@msn.com

Barbara Waller

unread,
May 1, 2002, 7:50:31 PM5/1/02
to
Will do, thanks for the help.

"Dave Peterson" <ec3...@msn.com> wrote in message

news:3CD07E12...@msn.com...

0 new messages