+ Reply to Thread
Results 1 to 7 of 7

Macro to open a workbook from an unknown file path

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Macro to open a workbook from an unknown file path

    Please can someone provide me with a macro to do the following:

    Find a file (say test.xls) from a unknown file path (say in a subdirectory on C:/ drive)

    Thanks

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to open a workbook from an unknown file path

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    11-27-2012
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Macro to open a workbook from an unknown file path

    Patel45. Still having trouble with this one.

    Macro seems to stop on Set objFSO = CreateObject("Scripting.FileSystemObject")

    Any suggestions why??

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Macro to open a workbook from an unknown file path

    Ahhh finally got it working. Seems issue is that it can search one subdirectory deep. Is it possible to modify it to search through say 4 tiers for subdirectories? Thanks for your help.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to open a workbook from an unknown file path

    Please Login or Register  to view this content.
    Last edited by patel45; 11-30-2012 at 07:16 AM.

  6. #6
    Registered User
    Join Date
    11-27-2012
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Macro to open a workbook from an unknown file path

    Thanks very Patel45. That works great now. Is it possible to add the following step too.


    Say cell B4 in the original spreadsheet (where this macro is located) is the name of a macro in the newly opened spreadsheet. I need to run this macro and then copy data (say cell B5) from the original spread sheet into the newly opened spreadsheet (say into cell A1)

    Hope that makes sense. Thanks again

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to open a workbook from an unknown file path

    obviously not tested
    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)

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