+ Reply to Thread
Results 1 to 2 of 2

Copy two ranges from one workbook to another

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    24

    Copy two ranges from one workbook to another

    Hi all,
    I would really appreciate help with the code below, shouldn't be very challenging for you guys, I'm just a beginner though.
    I've been trying to to create a macro that would do the following:
    1. Copy the range A2:AT10000 from one workbook to the first sheet of a new workbook.
    2. Go back to the initial workbook and select range A6:HF10000 in the sheet with codename: Sheet11
    3. Paste the selection to a newly added worksheet (sheet 2) of the workbook created in step 1

    I am getting run time error 424 and when debugging, the highlighted line is:
    Please Login or Register  to view this content.
    Thanks for your time!


    Please Login or Register  to view this content.
    Last edited by philips; 02-01-2013 at 06:32 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copy two ranges from one workbook to another

    Hi, philips,

    maybe use either of these two approaches:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Is there really data in all these cells or could UsedRange be used to only copy that range?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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