Consulting

Results 1 to 3 of 3

Thread: 1004 Error Copying and Pasting Range

  1. #1

    1004 Error Copying and Pasting Range

    Code.JPG

    Hey guys, so I am trying to build a code that cycles through a workbook. It will find and copy the proper range from each sheet and then paste it to the proper place based on a condition. Keep getting an error message! Keep in mind, the two sheets included in the case portion of the code are the first two sheets of the workbook, which the data from the other sheets will be copied to. So the code does not run through those first two sheets for the first part of the code. Any help with this would be greatly appreciated!!

  2. #2
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    3,837
    Location
    How are we supposed to read that?
    Remember To Do the Following....
    Use tags when posting code to the thread,
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Wizard
    Joined
    Apr 2007
    Posts
    6,995
    Location
    ... and a small sample WB would help so we don't need to retype your code and create a test bed.

    Anyways,

    1. I don't understand the Sheets(i).UsedRange

    2. Try it without the sht. in front of the Range on the Yellow Line to see if it makes a difference
    Paul

    ------------------------------------------------------------------------------------------------------------------------
    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s)
    (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •