Consulting

Results 1 to 3 of 3

Thread: 1004 Error Copying and Pasting Range

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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 Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,057
    Location
    How are we supposed to read that?
    Remember To Do the Following....
    Use [Code].... [/Code] 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 Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    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


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    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) / 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
  •