+ Reply to Thread
Results 1 to 11 of 11

Why is my copy/paste macro failing?

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Why is my copy/paste macro failing?

    I have a code that is almost exactly like this, except I am copying 8 different ranges from different workbooks into one, while this one is taking one range from one workbook into 8 different ones. This is a shorten code, but same issue. It will highlight the range in 'z' but not paste anything.


    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Why is my copy/paste macro failing?

    Hi,

    You're copying from z to a and then closing a without saving. Did you mean to copy the other way?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    Sorry, right now 'a isn't closing. It will, but i'll save it. right now, everything is left open.

    I figured out that it is because the workbooks were already open. Can I adjust to run either way?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Why is my copy/paste macro failing?

    You might do something like this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    OK. Thanks.

    If I leave Z open, it leaves the range selected with that copy border buzzing around the range. I tried to just select A1 to stop that but it errored. How do I?

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Why is my copy/paste macro failing?

    Please Login or Register  to view this content.
    should remove the dancing ants

  7. #7
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    Thanks for the help!

  8. #8
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    Hey, so I am getting subscript out of range when I try

    Please Login or Register  to view this content.

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Why is my copy/paste macro failing?

    You don't include the path when accessing the Workbooks collection, and you need an error handle- review the differences between my code and yours.

  10. #10
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    oh jesus christ! long day

    but i'm still having the issue and I think i've straightened my last issue out and i'm reflecting yours.

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Why is my copy/paste macro failing?

    I didn't have the On Error part. I was avoid that because I wanted to test and see any errors, which of course cause it to never get passed step one lol

+ 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] Code failing on ActiveSheet.Paste
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-29-2015, 01:57 PM
  2. [SOLVED] Failing to write a search and cut and paste macro
    By top_dog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 04:50 AM
  3. [SOLVED] paste.special is failing
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2014, 08:03 AM
  4. ActiveSheet.Paste failing(Runtime error '1004')
    By sanjeevap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2013, 12:58 PM
  5. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM
  6. copy method of object failing
    By vj2india in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2006, 09:25 PM
  7. [SOLVED] Excel Copy Method Failing.
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2005, 01:06 PM

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