+ Reply to Thread
Results 1 to 11 of 11

Full path-name in title bar ?

  1. #1
    Stefan
    Guest

    Full path-name in title bar ?

    Hello,

    Is it possible to put the full path name of the opened file in the bleu
    title bar from excel, this always en automatically.

    --> Microsoft Excel - c:/data/stefan/filename instead of Microsoft Excel -
    filename


    Many thanks
    Stefan

  2. #2
    Bob Phillips
    Guest

    Re: Full path-name in title bar ?


    Public WithEvents App As Application

    Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
    Wn.Caption = Wb.FullName
    End Sub

    Private Sub App_WorkbookBeforeClose(ByVal Wb As Workbook, Cancel As Boolean)
    App_WindowActivate Wb, Windows(Wb.Name)
    End Sub

    Private Sub Workbook_Open()
    Set App = Application
    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code



    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Stefan" <123@abc> wrote in message
    news:1D351CFC-7BA1-4481-86C3-061349F43E01@microsoft.com...
    > Hello,
    >
    > Is it possible to put the full path name of the opened file in the bleu
    > title bar from excel, this always en automatically.
    >
    > --> Microsoft Excel - c:/data/stefan/filename instead of Microsoft

    Excel -
    > filename
    >
    >
    > Many thanks
    > Stefan




  3. #3
    Stefan
    Guest

    Re: Full path-name in title bar ?

    Thanks Bob,

    I get the full name, except i've got a 'subscript out of range' error as
    soon as i close a window.

    Secondly, i have to open that specific file first before the full path
    appears.

    Stefan

  4. #4
    Stefan
    Guest

    Re: Full path-name in title bar ?

    Bob,

    With an 'on error goto' statement i can prevent that 'subscript out of
    range' error. Complete path-name still occurs.

    The second problem was solved by saving the file in the 'XLStart' directory
    of Microsoft Office and put an extra program line so that Excel automatically
    starts with that file and immediately minimizes the windowstate of it.

    Again thanks for putting me on the way.
    Stefan

  5. #5
    Bob Phillips
    Guest

    Re: Full path-name in title bar ?

    Stefan,

    I would have put it in Personal.xls, not have another file opened.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Stefan" <123@abc> wrote in message
    news:81CFE738-F94B-47D0-BBEC-1193B2FECE19@microsoft.com...
    > Bob,
    >
    > With an 'on error goto' statement i can prevent that 'subscript out of
    > range' error. Complete path-name still occurs.
    >
    > The second problem was solved by saving the file in the 'XLStart'

    directory
    > of Microsoft Office and put an extra program line so that Excel

    automatically
    > starts with that file and immediately minimizes the windowstate of it.
    >
    > Again thanks for putting me on the way.
    > Stefan




  6. #6
    Dave Peterson
    Guest

    Re: Full path-name in title bar ?

    Just wondering why you included this routine:

    Private Sub App_WorkbookBeforeClose(ByVal Wb As Workbook, Cancel As Boolean)
    App_WindowActivate Wb, Windows(Wb.Name)
    End Sub

    The captions seem to get updated fine without it.



    Bob Phillips wrote:
    >
    > Stefan,
    >
    > I would have put it in Personal.xls, not have another file opened.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Stefan" <123@abc> wrote in message
    > news:81CFE738-F94B-47D0-BBEC-1193B2FECE19@microsoft.com...
    > > Bob,
    > >
    > > With an 'on error goto' statement i can prevent that 'subscript out of
    > > range' error. Complete path-name still occurs.
    > >
    > > The second problem was solved by saving the file in the 'XLStart'

    > directory
    > > of Microsoft Office and put an extra program line so that Excel

    > automatically
    > > starts with that file and immediately minimizes the windowstate of it.
    > >
    > > Again thanks for putting me on the way.
    > > Stefan


    --

    Dave Peterson

  7. #7
    Stefan
    Guest

    Re: Full path-name in title bar ?

    "Bob Phillips" wrote:

    > Stefan,
    >
    > I would have put it in Personal.xls, not have another file opened.
    >
    > --
    > HTH
    >


    Can you give me some more information, i cant follow.
    Is personal.xls the name of that file and in which directory must i save it??

    thnx
    Stefan

  8. #8
    Bob Phillips
    Guest

    Re: Full path-name in title bar ?

    Stefan,

    Personal.xls is a file that Excel knows about, and is normally used to store
    your personal, application wide code. If you go to Tools>Macro>Record New
    Macro ..., and you will see a dialog. If you click the drop-down on the
    right, one of the options is Personal.xls. Just select that and click OK<
    then hit the Stop Recording button immediately. That will create a
    Personal.xls file for you. This is saved in the XLStart directory, and
    automatically opens when Excel starts, but in a non-visible state. This is a
    good file for stuffing code like this.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Stefan" <123@abc> wrote in message
    news:729B009E-AC11-417A-850A-047EC7BD2051@microsoft.com...
    > "Bob Phillips" wrote:
    >
    > > Stefan,
    > >
    > > I would have put it in Personal.xls, not have another file opened.
    > >
    > > --
    > > HTH
    > >

    >
    > Can you give me some more information, i cant follow.
    > Is personal.xls the name of that file and in which directory must i save

    it??
    >
    > thnx
    > Stefan




  9. #9
    Stefan
    Guest

    Re: Full path-name in title bar ?

    > Stefan,
    >
    > Personal.xls is a file that Excel knows about, and is normally used to store
    > your personal, application wide code. If you go to Tools>Macro>Record New
    > Macro ..., and you will see a dialog. If you click the drop-down on the
    > right, one of the options is Personal.xls. Just select that and click OK<
    > then hit the Stop Recording button immediately. That will create a
    > Personal.xls file for you. This is saved in the XLStart directory, and
    > automatically opens when Excel starts, but in a non-visible state. This is a
    > good file for stuffing code like this.
    >
    > --
    > HTH
    >


    Thanks.

    I gonna try it.



  10. #10
    Stefan
    Guest

    Re: Full path-name in title bar ?

    Bob,


    It works just perfect. Thank you.

    My college at work has asked it. She's gonna be wild if she see's this.

  11. #11
    Papgnal
    Guest

    Re: Full path-name in title bar ?

    Can something be added to update the Path in the title bar when you save the
    workbook as a different file name?

    "Bob Phillips" wrote:

    >
    > Public WithEvents App As Application
    >
    > Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
    > Wn.Caption = Wb.FullName
    > End Sub
    >
    > Private Sub App_WorkbookBeforeClose(ByVal Wb As Workbook, Cancel As Boolean)
    > App_WindowActivate Wb, Windows(Wb.Name)
    > End Sub
    >
    > Private Sub Workbook_Open()
    > Set App = Application
    > End Sub
    >
    > 'This is workbook event code.
    > 'To input this code, right click on the Excel icon on the worksheet
    > '(or next to the File menu if you maximise your workbooks),
    > 'select View Code from the menu, and paste the code
    >
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Stefan" <123@abc> wrote in message
    > news:1D351CFC-7BA1-4481-86C3-061349F43E01@microsoft.com...
    > > Hello,
    > >
    > > Is it possible to put the full path name of the opened file in the bleu
    > > title bar from excel, this always en automatically.
    > >
    > > --> Microsoft Excel - c:/data/stefan/filename instead of Microsoft

    > Excel -
    > > filename
    > >
    > >
    > > Many thanks
    > > Stefan

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1