+ Reply to Thread
Results 1 to 2 of 2

Problem with a relative file path in macro that loops through files in folder

  1. #1
    Registered User
    Join Date
    05-03-2006
    Posts
    37

    Problem with a relative file path in macro that loops through files in folder

    Hi all,

    I am having problems with a relative (as opposed to an absolute) folder path.

    I am trying to reach out to a folder called "Forms to upload" that is in the same folder as the workbook that contains the macro, and then loop through all the files in the folder "Forms to upload", copy and pasting from sheet "Agency Background" (same sheet appears in all the files) into a master sheet "tbl_AGBACK1" in the current workbook.

    I nicked this code from a previous thread:

    Please Login or Register  to view this content.
    The problem is the code gets stuck at the line:

    Please Login or Register  to view this content.
    And I think the problem is I have the syntax wrong of this relative file path:

    Please Login or Register  to view this content.
    Hope someone can help.

    Thanks

    Henry

  2. #2
    Registered User
    Join Date
    05-03-2006
    Posts
    37

    Re: Problem with a relative file path in macro that loops through files in folder

    Fixed it with the correction...

    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)

Similar Threads

  1. Code to list the folder path and sub folder path of a specific file
    By kalai1587 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 03:51 AM
  2. Macro Relative File Path Help
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2013, 09:21 AM
  3. Relative/Variable File Path Macro Help
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 08:09 PM
  4. consolidating excel files into one file not using hard code of folder path
    By rrakkki in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2011, 09:05 AM
  5. Run a .bat file from a macro (using a relative path)
    By titus.hanke in forum Excel General
    Replies: 2
    Last Post: 12-03-2008, 10:28 AM
  6. Determining relative file path macro
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2007, 12:25 AM
  7. Replies: 1
    Last Post: 05-24-2007, 07:28 AM

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