About 201,000 results
Open links in new tab
  1. How to redim multidimensional correctly - MrExcel

    Jun 9, 2022 · TheGREATrandino T I Need to ReDim alternative to keep dimension inside the module but set data to 0 or empty in VBA Invisibleman Aug 3, 2025 Excel Questions Replies 9 …

  2. Vba arrays, redim, preserve | MrExcel Message Board

    Mar 28, 2009 · Redim allows you define the array bounds, resize it essentially. Redim clears out any existing values unless you call the Preserve keyword. If you redim a multi-dimensional …

  3. Redim Preserve an array and fill with values from controls.

    Apr 8, 2016 · With Preserve, we can resize only the last array dimension ReDim Preserve arr(1 To 10, 1 To 6) 'After this, UBound(arr, 2) is 6 'Fill array's new elements with values. The For …

  4. VBA: Redim Preserve Multidimensional Array? - MrExcel

    Dec 8, 2015 · With a 2D array you can only change the size of the 2nd dimension when using redim preserve.

  5. Public variables redim | MrExcel Message Board

    Jul 18, 2013 · HELLO FRIENDS. I have written a long VBA code in excel. I am using a variable accross many sheets and many subs. I have initially defined the variable in a module as: …

  6. VBA Redim Preserve subscript out of range - MrExcel

    Mar 14, 2006 · Re: VAB Redim Preserve subscript out of range Ah, i figured since there was only 1 column it would be both the first and the last. How do i make it redim the last dimension?

  7. Add a row to a 2d array while preserving the old values

    May 8, 2021 · Welcome to the MrExcel board! Redim Preserve only allows you to change the last dimension in an array. See here for more. Provided your array is not huge (>65,000+ rows), it …

  8. Re indexing an array in vba | MrExcel Message Board

    Jul 9, 2015 · With ReDim you can only redim the last -2 to 2, so you can redim to arr (-2 to 2, 1 to 5). This is an annoying restriction in excel vba. You could write to a new array using a loop, …

  9. Vba Array subscript out of range | MrExcel Message Board

    Jan 16, 2022 · Public Function ReDimPreserve(ArrayNameToResize, NewRowUbound, NewColumnUbound) ' ' Code inspired by Control Freak ' ' Preserve Original data & LBounds & …

  10. Redim array - Script out of range | MrExcel Message Board

    Jul 16, 2017 · VBA Redim Preserve subscript out of range Hi All, I have an array containing 45 items in a single column, and can't for the life of me see whats wrong with this: dim avarData () …