+ Reply to Thread
Results 1 to 3 of 3

macro to add new sheet to many excel files from a master file

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Galway, Ireland
    MS-Off Ver
    MS Office 2010
    Posts
    8

    macro to add new sheet to many excel files from a master file

    I have little experience with macros in excel and I would like to ask if such thing is possible to achieve:
    I have many folders (around 500) - each of them contains a excel file (the excel files have all the same name), ideally I would like to be able to run a macro from a master excel file that would allow me to add a sheet which I would create in the master excel file and add it to all of the excel files that are in the folders.
    So far I have used the code from the link: http://stackoverflow.com/questions/6...using-vba?lq=1

    Please Login or Register  to view this content.
    but now when I am trying to run the code I will get Run-time error '9', Subscript out of range at a line:

    Please Login or Register  to view this content.
    but when I change it from 2.xlsx to 1.xslx in the code it works just fine, copying the sheets from the file to itself.
    As I said, I have little experience with excel macros and any kind of help would be really appreciated.
    Thanks.
    Last edited by ldsone; 07-10-2013 at 01:48 PM.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: macro to add new sheet to many excel files from a master file

    Cross posted here: http://www.ozgrid.com/forum/showthread.php?t=180544
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    Galway, Ireland
    MS-Off Ver
    MS Office 2010
    Posts
    8

    Re: macro to add new sheet to many excel files from a master file

    Quote Originally Posted by stanleydgromjr View Post
    and cross posted here: http://stackoverflow.com/questions/1...-a-master-file

+ 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