For example, the following statement enlarges the array by 10 elements without losing the current values of the original elements. VB ReDimPreservevarArray(UBound(varArray) +10) Note When you use thePreservekeywordwith a dynamic array, you can change only the upper bound of the last dimension...
Very well. I like the code of vba. But i think you have some issue with ReDim Result(1 To MyFiles.Count) and with the ReDim Preserve Result(1 To i – 1). Because i run the code and 1 of files i can’t see. I think the best to change ReDim Result(0 To MyFiles.Count) R...
However, each time you do this, the existing values in the array are lost. Use ReDim Preserve to expand an array while preserving existing values in the array.For example, the following statement enlarges the array by 10 elements without losing the current values of the original elements....
Use ReDim Preserve to expand an array while preserving existing values in the array.For example, the following statement enlarges the array by 10 elements without losing the current values of the original elements.vb Kopiëren ReDim Preserve varArray(UBound(varArray) + 10) ...