+ Reply to Thread
Results 1 to 2 of 2

Copying A Worksheet From Each Open Workbook to an new Workbook

  1. #1
    carl
    Guest

    Copying A Worksheet From Each Open Workbook to an new Workbook

    I have multiple workbooks each containing 1 worksheet that I would like to
    copy into 1 workbook. I recorded this macro to show the commands used to copy
    one of the worksheets the workbook "Summary.xls".

    Sub temp()
    Windows("throttling 20051220.xls").Activate
    Sheets("throttling 20051220").Select
    Sheets("throttling 20051220").Copy
    Before:=Workbooks("Summary.xls").Sheets(1)
    End Sub

    Is it possible to modify or change the macro so it will perform the copy
    into "Summary.xls" for each workbook that is open, and for each of these
    workbooks copy the workshhet that starts with the word "throttling", and to
    carry the name of the original worksheet "throttling 20051220" to the copied
    worksheet in my workbook named "Summary".

    Thank you in advance.


  2. #2
    Duke Carey
    Guest

    RE: Copying A Worksheet From Each Open Workbook to an new Workbook

    something like...

    Dim wb As Workbook

    For Each wb In Workbooks
    if wb.name <> "Summary.xls" then
    wb.sheets(1).copy Before:=Workbooks("Summary.xls").Sheets(1)
    end if
    Next


    "carl" wrote:

    > I have multiple workbooks each containing 1 worksheet that I would like to
    > copy into 1 workbook. I recorded this macro to show the commands used to copy
    > one of the worksheets the workbook "Summary.xls".
    >
    > Sub temp()
    > Windows("throttling 20051220.xls").Activate
    > Sheets("throttling 20051220").Select
    > Sheets("throttling 20051220").Copy
    > Before:=Workbooks("Summary.xls").Sheets(1)
    > End Sub
    >
    > Is it possible to modify or change the macro so it will perform the copy
    > into "Summary.xls" for each workbook that is open, and for each of these
    > workbooks copy the workshhet that starts with the word "throttling", and to
    > carry the name of the original worksheet "throttling 20051220" to the copied
    > worksheet in my workbook named "Summary".
    >
    > Thank you in advance.
    >


+ 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