1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| Sub testRedim()
Dim temp() As String, c As Long, base As Long, lastC As Long
On Error GoTo endSub
base = 10000000
c = 10000000
'c(vb6) = 33 361 918 c(vba)=25 133 054
Debug.Print "Type : « "; TypeName(tmp()); " »"
Debug.Print String(70, "=")
reprise:
For x = 0 To 1000
DoEvents
ReDim temp(1 To (c + (base * x)))
Erase temp
Next
Exit Sub
endSub:
lastC = c + (base * (x - 1))
Debug.Print "Dernière limite acceptée : "; Format(lastC, "# ### ### ###"), "( x= "; CStr(x - 1); " / base = " + CStr(base) + " )"
base = base \ 10
If base = 0 Then
Exit Sub
Else
c = lastC
Resume reprise
End If
End Sub |
Partager