+ Reply to Thread
Results 1 to 3 of 3

Running macro in workbooks before copying ranges to Master Workbook

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    Copenhagen, Denmark
    MS-Off Ver
    2011 Mac
    Posts
    13

    Running macro in workbooks before copying ranges to Master Workbook

    I have been using this guide to merge a range from all workbooks in a folder: http://msdn.microsoft.com/en-us/libr...ffice.12).aspx
    (more specifically, the following code
    Please Login or Register  to view this content.
    I would like to add some VBA so that the macro "CopyRangeFromMultiWorksheets" runs in the workbook before the range is copied.

    I think it should be something like
    Please Login or Register  to view this content.
    but that isn't working.

    I would really appreciate any help!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Running macro in workbooks before copying ranges to Master Workbook

    Does the code exist in the workbook 'mybook' and you want to run it?

    Please Login or Register  to view this content.
    Or do you want to run that code while the workbook 'mybook' is active?

    Please Login or Register  to view this content.
    which must be written in such a way as to act on either the activeworkbook or on a workbook object that is global.

    Or you could loop within this code:


    Please Login or Register  to view this content.

    becomes


    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-16-2014
    Location
    Copenhagen, Denmark
    MS-Off Ver
    2011 Mac
    Posts
    13

    Re: Running macro in workbooks before copying ranges to Master Workbook

    I was looking for the first code - just missing the ".name" - thank you so much!!

+ 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. Copying data from multiple workbooks to 1 master workbook
    By chilli76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2014, 12:50 PM
  2. Copying all EXCEL workbooks in a Folder to one master workbook
    By HitTheEXCELerator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2013, 10:42 PM
  3. [SOLVED] Copying data from other workbooks and pasting into master workbook
    By jcook1100 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-15-2013, 08:03 AM
  4. [SOLVED] Macro for Copying Cels from All Workbooks to a Single Master Workbook
    By JohnnyJ2013 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-25-2013, 05:51 AM
  5. Replies: 18
    Last Post: 05-11-2010, 09:18 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