+ Reply to Thread
Results 1 to 2 of 2

Pulling Data From Multiple Workbooks/Multiple Sheets into one Master Book

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    1

    Pulling Data From Multiple Workbooks/Multiple Sheets into one Master Book

    Hey all,
    I'm new to programming, and have been writing a VBA code for the following:
    Run code from master book
    open data books (call them Dat1 & Dat2 but there will be about 200)
    copy data from only certain sheets in Dat1 & Dat2 into Master Book

    The copy data from only certain sheets is where I am running into a problem. I have set this up by making it to where the sheet name of the Dat1 has to match the sheet name in the Master Book, and when they don't make i generate an error. I had a Error GoTo statement in my code, but it seems to crash after the first pass with an error.

    I want the code to be able to ignore the unspecificed sheets, and copy the desired ones.

    here is my code:

    Please Login or Register  to view this content.
    Last edited by LSUARefugee; 06-13-2013 at 01:23 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,449

    Re: Pulling Data From Multiple Workbooks/Multiple Sheets into one Master Book

    Hi and welcome to the forum,

    You need to do two things to help us help you.
    1. Put code tags around your code above. You need to edit your post, select the code and click on the "#" Icon above the message.
    2. You really need to attach two sample workbooks so we can run your code to see what it is supposed to do.

    All that said.. Did you know about setting breakpoints in your code and stepping through it yourself??

    I think this will get you a quicker answer than us helping you.. Read http://www.cpearson.com/Excel/DebuggingVBA.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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