+ Reply to Thread
Results 1 to 3 of 3

New to arrays-Resizing cell range when writing array

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Unhappy New to arrays-Resizing cell range when writing array

    I am trying to write a project level function that will automatically write a 1D or 2D array into another (closed) workbook. *

    See code below. It is working fine for 1D arrays but it is not working on 2D arrays (line 120). I'm sure it is something completely obvious but I am new to arrays and need help.



    Please Login or Register  to view this content.

    P.S. I recommend using ScreenUpdating = False/True before and after calling this function.


    * Provided you supply the arguments of (array and the closed workbooks folder path, file name, sheet name and which cell to start from) it should auto determine whether you want to write a 1D or 2D array, open the closed workbook, write the data to the sheet/starting cell required and then closed the workbook. The function will then return True or False depending on whether it was successful or not. (For error checking purposes)
    Last edited by mc84excel; 05-09-2013 at 07:57 PM. Reason: add required function from other module, add PS
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: New to arrays-Resizing cell range when writing array

    Uh oh. It looks the code posted has broken the 1D array write as well as the 2D (The 1D write had been working before )

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: New to arrays-Resizing cell range when writing array

    Ignore Post #2. I have solved the 1D array issue. (
    Please Login or Register  to view this content.
    )

+ 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