+ Reply to Thread
Results 1 to 6 of 6

loop through workbooks in folder copy "jan" sheet into new workbook

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    loop through workbooks in folder copy "jan" sheet into new workbook

    Hi all,

    I have some code which can be seen below, the attatchment shows what is happening at the minute if you copy the folder to root of "c:\" it wont work!

    Please Login or Register  to view this content.
    its suppose to copy all january sheets from all workbooks into 1 workbook.

    Thanks,
    Simon Green
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I modified some little things in your code and now it seems to work fine:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    cheers

    Thanks for that. It did appear to be working at first. But its only creating a new sheet using the cell 1,1 for the name. It isnt copying if you enter data into john then try the macro. John is just a blank sheet. But a real step in the right direction THANK YOU!! all we need to do now is to get it copying.

    Simon Green

  4. #4
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    Help

    Is there anybody who can help with this?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517
    Please Login or Register  to view this content.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Your example workbook test2 does not contain a sheet called "Jan", so nothing will copy. Your code works fine when it actually finds the sheets.

    PS, you should stick to the original post not start a new one.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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