+ Reply to Thread
Results 1 to 11 of 11

Copy List of Folders, Subfolders and Files to New Location

  1. #1
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Copy List of Folders, Subfolders and Files to New Location

    Hi Experts,

    I'm attempting to Copy a multiple list of folders and all the contents within them (Subfolders and Files) that are listed in column A to the new location list in column B. I've attempted using the code below but I'm getting the Run-time error '91' Object variable or with block variable not set at the folder line near the bottom.

    Please Login or Register  to view this content.
    Any help would be greatly appreciated as this would really save me a lot of time.

    Thanks in advance.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,162

    Re: Copy List of Folders, Subfolders and Files to New Location

    Try...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: Copy List of Folders, Subfolders and Files to New Location

    Thanks for your reply dangelor. I tried what you suggested but still get the same resulting error.

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,162

    Re: Copy List of Folders, Subfolders and Files to New Location

    Possibly...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: Copy List of Folders, Subfolders and Files to New Location

    Thanks for your assistance Dangelor, this time I get the error run Tim 429 activex component can't create object.

  6. #6
    Forum Contributor
    Join Date
    03-08-2018
    Location
    Denmark
    MS-Off Ver
    2016 for Windows
    Posts
    363

    Re: Copy List of Folders, Subfolders and Files to New Location

    Hi MusicMan
    I made a tool for updating License on my applications.
    There are also functions to move files, replace them, change extentions and other things.
    You are welcome to use it.
    I also got some help with mine, so only fair to share.

    It might take a few go's to find out how it works, but it should be straight forward.

    Happy hours
    Attached Files Attached Files

  7. #7
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,162

    Re: Copy List of Folders, Subfolders and Files to New Location

    Try this code...
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: Copy List of Folders, Subfolders and Files to New Location

    Thanks nordicdust but I did not see anything there for moving the folders like I needed. Dangelor, when I run this code I get the error path not found. I double and triple checked to ensure that the paths are there.

  9. #9
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,162

    Re: Copy List of Folders, Subfolders and Files to New Location

    Do your paths end with a \?

  10. #10
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: Copy List of Folders, Subfolders and Files to New Location

    I've tried it with and without.

  11. #11
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,162

    Re: Copy List of Folders, Subfolders and Files to New Location

    Can you post a 'dummy' file?


    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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. [SOLVED] VBA Module to copy all files from a folder and it's sub-folders into one location
    By X*DG^& in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-13-2019, 02:40 AM
  2. copy or cut pdf files from folders and subfolders into one single folder
    By druva in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2019, 01:27 PM
  3. how to copy and paste folders / subfolders and files
    By ColemanJames in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2018, 07:32 PM
  4. [SOLVED] Macro to Copy and paste folders and subfolders without files in it
    By Madhut in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2016, 01:47 PM
  5. Needs macro to copy excel files from folders, subfolders to new folder
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2014, 08:53 AM
  6. [SOLVED] Map/List of folders, subfolders & files
    By Bogdan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2006, 01:10 PM
  7. copy subfolders, replace text in files and save files in copied subfolders
    By pieros in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 09:05 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