+ Reply to Thread
Results 1 to 8 of 8

Why isn't array copying?

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

    Why isn't array copying?

    Under the 'Paste you will see the array code I have made comments. After that is what I have to use because I can't get the array to work. I've tried a couple different variations. The other Array codes (remove objects and close workbooks) work, so I figure it isn't the array itself but I don't know.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Why isn't array copying?

    Perhaps:

    Please Login or Register  to view this content.
    Why did you stick On Error Resume Next in there? It's just going to mask whatever was wrong.
    Rory

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

    Re: Why isn't array copying?

    Because if i don't I will get an error here
    Please Login or Register  to view this content.
    It is set to say, if the workbook is already open here, if it isn't go here and open. Is there a better way of doing it? I've had it this way for sometime and I'm betting that I received help from this forum when I set it up for it because until recently that would have been outside my skill level, but if there is another way to do it then i'm 100% open to an easier way. love to learn it

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Why isn't array copying?

    I meant the one before ZRng.Copy actually. You should only leave an OERN line in effect for the minimum amount of code necessary.

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

    Re: Why isn't array copying?

    Oh probably because i'm an idiot and its junk code. I will end it after opening the files and remove that.

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Why isn't array copying?

    Given that you are doing the same thing repeatedly, I'd probably refactor that into a separate function and call it for each workbook. Then you can put the OERN into just that function, rather than the main code.

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

    Re: Why isn't array copying?

    Yes! I literally thought that while I was posting. not sure how to make that its own thing and then call to it though. That would save a lot of work because each month I have to update about six macros that have this exact language.

  8. #8
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,257

    Re: Why isn't array copying?

    Perhab like this
    Please Login or Register  to view this content.
    Last edited by daboho; 10-17-2018 at 03:16 PM.

+ 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] Copying an array formula down keeps copying data in top row
    By blackrosepetals9169 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-10-2018, 05:15 AM
  2. Array Copying Help
    By Scoobster_doo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2017, 01:41 PM
  3. [SOLVED] Copying an Array
    By UNAB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-26-2013, 08:16 PM
  4. Copying Array
    By yogeshmaney in forum Excel General
    Replies: 1
    Last Post: 02-26-2010, 03:55 AM
  5. Copying Array Onto Range
    By Dan_Dollar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2007, 02:51 PM
  6. Copying from an array conditionally
    By robhargreaves in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-06-2007, 12:59 PM
  7. [SOLVED] Copying an Array
    By BDH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-21-2006, 12:15 AM

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