+ Reply to Thread
Results 1 to 4 of 4

vba to copy all sheets in the workbooks open by macro to active workbook

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    EXCEL 2016
    Posts
    1,040

    vba to copy all sheets in the workbooks open by macro to active workbook

    I am using the code below to open all excel files in a specific folder .

    Please Login or Register  to view this content.
    But how to copy all sheets tabs of the open workbook by macro to the active workbook(extract sheets1a workbook) , there are no blank worksheets in open workbook and then close the open workbooks by the same macro

    What I am meaning :The macro open workbook BB, workwork cc, then it copies all the sheets to the current active workbook extractsheet 1a where the macro was activated and close all the workbook open by the macro that is workbook bb , workbook cc when finished copying the sheets to active workbook

    There may be 5 to 6 workings to open in the specified directory .

    Looking a vba code to achieve this
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    275

    Re: vba to copy all sheets in the workbooks open by macro to active workbook

    Hi Jean,

    Reference the Microsoft Runtime Scripting Library to reference files and folders and loop from the active workbook copying sheets to the other https://www.excelcampus.com/vba/copy...ls-vba-macros/ & combined with https://youtu.be/zHJPliWS9FQ.

  3. #3
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    EXCEL 2016
    Posts
    1,040

    Re: vba to copy all sheets in the workbooks open by macro to active workbook

    Hi Dal

    Not exactly what I was looking for

  4. #4
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    EXCEL 2016
    Posts
    1,040

    Re: vba to copy all sheets in the workbooks open by macro to active workbook

    So far googling I get that code .

    But the code copy all active workbook sheets to a new workbook

    Can someone assist to copy all active workbook sheets to active workbook where the macro will be triggered instead

    When tested copies all open workbooks to a new workbook

    Please Login or Register  to view this content.

+ 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] Copy Sheets from Closed Workbook into Open Active Workbook without linking
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2018, 04:54 PM
  2. Macro to open file, filter data and copy to another workbook/sheets
    By mati_WAR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2017, 10:09 AM
  3. Open closed workbook, copy ranges from multiple sheets into an active Mastersheet
    By bgonen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2015, 08:01 AM
  4. Replies: 15
    Last Post: 10-04-2015, 03:24 PM
  5. [SOLVED] Macro to copy data from two workbook to another where all workbooks are open
    By ALNER in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-10-2014, 03:11 PM
  6. [SOLVED] Open Multiple Workbooks, Record names, Copy paste to Active Workbook, Close the Workbooks
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 06:09 AM
  7. Open workbook, filter values, copy/paste into Active workbook.
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 12:17 PM

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