Consulting

Results 1 to 5 of 5

Thread: Solved: How to properly redimension an array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Tutor jamescol's Avatar
    Joined
    May 2004
    Location
    Charlotte, NC
    Posts
    251
    Location

    Solved: How to properly redimension an array

    Say I start out with any array of unknown size:

    [vCode]
    Option Base 1
    Dim myArray() as Variant
    [/Code]

    During the procedure, I query a table for the number of rows it contains. Now I need to allocate enough space in the array to hold 1 element for each row. How do I properly accomplish this task?

    Next, I hit another table, and need to allocate more space in the array for its rows, while maintaining the data the array already contains? How do I do that?

    Thanks,
    James
    Last edited by Aussiebear; 03-27-2023 at 02:42 AM. Reason: Adjusted code tags
    "All that's necessary for evil to triumph is for good men to do nothing."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •