Results 1 to 7 of 7

Thread: [RESOLVED] location/directory of workbook?

  1. #1

    Thread Starter
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Resolved [RESOLVED] location/directory of workbook?

    Hey all,

    Is there a command to get the full path of the current workbook?

    like a Workbook.Location or something?

    which would return "C:\test\workbook.xls" ?

    thanks much!

  2. #2
    Fanatic Member dmaruca's Avatar
    Join Date
    May 2006
    Location
    Jacksonville, FL
    Posts
    577

    Re: location/directory of workbook?

    Workbook.Path

  3. #3

    Thread Starter
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Re: location/directory of workbook?

    That doesn't work for me...

    do I have to defined Workbook as my current Workbook?

    and Application.path returns the MS office folder...

  4. #4
    Fanatic Member dmaruca's Avatar
    Join Date
    May 2006
    Location
    Jacksonville, FL
    Posts
    577

    Re: location/directory of workbook?

    The path won't return any data if the workbook hasn't been saved yet. Use ActiveWorkbook if you aren't sure which workbook to reference.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: location/directory of workbook?

    Try
    Code:
    Application.ActiveWorkbook.FullName

  6. #6

    Thread Starter
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Re: location/directory of workbook?

    awesome thanks guys

  7. #7

    Thread Starter
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Re: location/directory of workbook?

    combined with

    Application.ActiveWorkbook.name

    get the whole path and file name

Posting Permissions

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



Click Here to Expand Forum to Full Width