Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macros & Path Name (Excel 2002)

    Is there a way to show the full path in the active title bar? I have a macro to do that in Word that I got on this forum, but cannot figure out how to make it work in Excel.

    Second question: Can I put individual macros on toolbars as buttons? Can do in Word and Access but having trouble in Excel.

    Thanks for any responses!

    Marjory

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Macros & Path Name (Excel 2002)

    <pre> Sub ChangeTitleBar()
    ActiveWindow.Caption = ActiveWorkbook.FullName
    End Sub
    </pre>


    2) View toolbars - customize -commands - macros categories - custom button
    Drag it where you want then modify to ASSIGN Macro, edit picture, etc

    Steve

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros & Path Name (Excel 2002)

    How do you get that to run automatically for all workbooks?

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,832
    Thanks
    136
    Thanked 484 Times in 461 Posts

    Re: Macros & Path Name (Excel 2002)

    Put Steve's routine in your personal.xls file which is loaded each time you start an excel session.


    zeddy

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macros & Path Name (Excel 2002)

    Personally, I use a different way of displaying the full path that doesn't involve any programming:

    Select Tools | Customize...
    Activate the Commands tab.
    Select the Web category.
    Drag the Address dropdown list to a convenient place on the menu bar or one of the toolbars.
    Adjust the width by dragging the right edge of the dropdown list.
    Close the Customize dialog.

    Perhaps not as elegant as modifying the window caption, but simple and effective. Works in Word and PowerPoint too.

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Macros & Path Name (Excel 2002)

    <P ID="edit" class=small>(Edited by sdckapr on 10-Jun-03 10:56. edited to fix formatting tag)</P>You c add the line of code to the workbook open event of all your workbooks (it does NOT go in a normal module, but in the this workbook object)

    <pre>Private Sub Workbook_Open()
    ActiveWindow.Caption = ActiveWorkbook.FullName
    End Sub</pre>


    Beware this means that all these workbooks will trigger a macro warning!

    You could also add the earlier code I posted in your personal.xls workbook. and add it to a toolbar button. Then you would have to remember to push the button whenever you opened or changed workbooks or did a SAVEAS.

    It is especially important to run this AFTER a saveas, since the saveas will NOT change the caption otherwise!

    Steve

Posting Permissions

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