+ Reply to Thread
Results 1 to 4 of 4

Can i add another dimension to my variant array and store additional data?

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Can i add another dimension to my variant array and store additional data?

    I have some code that i found on-line which populates an array (variant array) with the names in a given directory.

    What i want to do is parse these file names storing the result into an array.

    I would like to store them in the same array that has the original file names but i am having trouble......

    I tried redim preserve..........see attached file/code.....but it did not work........


    any ideas?
    Attached Files Attached Files
    Last edited by welchs101; 04-20-2012 at 12:24 PM.

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Can i add another dimension to my variant array and store additional data?

    i decided to just change the array inside the original subroutine that was populating the array.

    this seem to work just fine.



    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Can i add another dimension to my variant array and store additional data?

    i am curious though why i cant redim preserve the array as i did below:

    Please Login or Register  to view this content.

    dont know why neither of these work.

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

    Re: Can i add another dimension to my variant array and store additional data?

    When you use Preserve, you can only change the last dimension of an array.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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