Results 1 to 6 of 6
  1. #1
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Formatting Code for Path (2002)

    I can
    You know it's time to diet when you push away from the table and the table moves.

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Formatting Code for Path (2002)

    Hi Omega

    Starting with Excel 2002 you can insert the path in a header or footer by using &[Path]. For details see MSKB 287482.
    This can also be achieved by using VBA, which was the only way to achieve this prior to Excel 2002, for details see MSKB 213615.

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

    Re: Formatting Code for Path (2002)

    You can use VBA. See <post#=44551>post 44551</post#>. Or see Tony's reply.

  4. #4
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Formatting Code for Path (2002)

    I knew about the &[path] when you do it manually but I wanted to do it using VBA. Unfortunately you don't use the same thing when you set the Pagesetup.LeftFooter property in VBA. I already had code to setup my footer for other things except the pathname.

    I will drop the &F and simply use the Activeworkbook.fullname and that will give me both path and filename. Maybe the next release will include the formatting code for the path. But this solution does the job. Thanks!
    You know it's time to diet when you push away from the table and the table moves.

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Formatting Code for Path (2002)

    Hi,
    The formatting code for the path is &Z - if you want path and filename you just use &Z&F.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Formatting Code for Path (2002)

    Thank you Rory.

    I looked up the Formatting codes in MSDN under Excel 2002 and &Z was not listed as one of them. Glad to know what the proper code is so I can include it in my footer page. Thanks again.
    You know it's time to diet when you push away from the table and the table moves.

Posting Permissions

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