+ Reply to Thread
Results 1 to 3 of 3

Two dimensional array Redim preserve problem

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    87

    Two dimensional array Redim preserve problem

    Im trying to populate an array with three fields per row from the outlook address book. The code im using is as follows (ive omitted
    the outlook classes, references etc as my problem is to do with the vba array itself and i dont think the source of the data is relevant in this case) .

    The problem is at the "Redim preserve" statement. Im basically trying to have the three items on one row eventually on a worksheet, and the next result on the row below it and so on
    online searches say you can only redim the last dimension of the array and ive tried different things but cant quite get the result..very frustrating.

    When i step through the code, it populates the first three elements and thats it..i guess because the size of the array is not changing, so its the resize thats letting me down .

    Will be grateful for some help.

    thanks


    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Two dimensional array Redim preserve problem

    Reverse the order of the subscripts, so that r indexes the second dimension of the array.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-19-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Two dimensional array Redim preserve problem

    hi thanks for your reply, ended up trying a different approach.

+ 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] Dynamic Array Fails to Redim Preserve
    By rodalsa1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-07-2013, 09:52 AM
  2. [SOLVED] Redim Preserve array: subscript out of range
    By supern0va in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-02-2012, 12:58 PM
  3. redim preserve multidimensional array
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2011, 02:48 PM
  4. Redim 2 dimensional array
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2011, 10:38 AM
  5. Redim Preserve 2D Array
    By kraljb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2006, 03:23 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