+ Reply to Thread
Results 1 to 6 of 6

Extract file path from sheet location - then open another file in the same directory

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Question Extract file path from sheet location - then open another file in the same directory

    Hi

    I'm new to excel land self taught, I'm having trouble with a Macro I wish to create which will extract the file path from the active workbook and use this file path to open a new file with a predetermined name that sits in the same directory.

    The code works fine when I manually enter the file directory but I wish to obtain the file directory from the active work books location.
    Please Login or Register  to view this content.
    Last edited by mick86; 09-18-2012 at 12:21 PM.

  2. #2
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Extract file path from sheet location - then open another file in the same directory

    This displays the fiel path in a msg box just fine

    Please Login or Register  to view this content.
    The code works fine when I manually enter the file directory but I wish to obtain the file directory from the active work books location.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Extract file path from sheet location - then open another file in the same directory

    I'm still trying to work this out

  4. #4
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Extract file path from sheet location - then open another file in the same directory

    any assistance greatly appreciated

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Extract file path from sheet location - then open another file in the same directory

    Something like this?
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Extract file path from sheet location - then open another file in the same directory

    Quote Originally Posted by tigeravatar View Post
    Something like this?
    Please Login or Register  to view this content.
    That did the trick, thank you sir I made a small change to allow me to reference a sub folder using the demonstrated coding template.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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