+ Reply to Thread
Results 1 to 2 of 2

Copying worksheets from several workbooks into one

  1. #1
    Registered User
    Join Date
    05-25-2010
    Location
    East Midlands
    MS-Off Ver
    Excel 2007
    Posts
    5

    Copying worksheets from several workbooks into one

    Hello,

    I have several workbooks in one directory. All of those workbooks contain a worksheet which I want to copy into another workbook, where all of those worksheets are collected.

    I have written the following code already:
    Please Login or Register  to view this content.
    The problem is, when I run this macro in all of my workbooks, then it simply overwrites the "allSheets" file.
    My question is, how do I add worksheets to this file, so that I can collect all worksheets in that workbook?

    Thanks,
    Lily.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copying worksheets from several workbooks into one

    If you put this code in your allsheets.xls workbook and have it open you can then open the workbooks you want to copy from and when you run it the active sheet will be copied to allsheets.xls.

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ 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