+ Reply to Thread
Results 1 to 3 of 3

Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbook

  1. #1
    Registered User
    Join Date
    08-27-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbook

    Hello All! I am attempting to put together a macro that will grab the first sheet of every workbook in a directory, then copy those worksheets into the current workbook one after another. Basically, multiple departments are editing and submitting a workbook. Each workbook has only one sheet in it. I want the macro to open each of those workbooks, copy the only sheet, and insert it into the current workbook one after another. It seems that no matter what I try, I end up getting either a 400 error with no additional information, or (more commonly) a Runtime Error 1004. Here is the code I have so far (cobbled together from various internet sources):

    Please Login or Register  to view this content.
    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbo

    Please Login or Register  to view this content.
    should be
    and declare variable sourceBook As Workbook

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-27-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbo

    Thanks for the response! This resolved my issue!!

+ 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] Copying Worksheets from Multiple Workbooks to a Single Workbook, Separate Worksheets
    By DHartwig35805 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-27-2012, 11:38 AM
  2. Copying Worksheets from Multiple Workbooks to a Single Workbook, Separate Worksheets
    By Abhi_1977 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2012, 11:32 AM
  3. Runtime error 1004 when copying and pasting a filtered collumn excel 2010
    By Shedacq in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2012, 06:35 AM
  4. Copying Multiple worksheets in Multiple workbooks to one single workbook
    By ebrabender in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-28-2011, 02:30 PM
  5. shared workbook runtime error 1004
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-02-2005, 02:09 PM

Tags for this Thread

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