Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am redimming an array in a loop. I do not know in before hand how many
times the loop will run. the array must have the siame size as the number of iterations in the loop. My problem is that I ReDim the array using the number of iterations as upper boundary. However I get the error message "index outside of interval". I do not understand how this can happen. Perhaps someone can help me? Any help is appeciated! Thanks very much in advance! Do Until IsEmpty(rngSecID.Offset(r, lngTypeColumn)) ReDim strMaturityArray(0 To r) If rngSecID.Offset(r, lngTypeColumn).Text = strGovBond Then strMaturityArray(r) = Mid(rngSecID.Offset(r, 0), InStr(InStr(1, rngSecID.Offset(r, 0), " ") + 1, rngSecID.Offset(r, 0), " ") + 1, 4) MsgBox strMaturityArray(r) End If r = r + 1 Loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Do Loop or use End iF for search string | Excel Discussion (Misc queries) | |||
ReDim Array | Excel Programming | |||
Dim and Redim | Excel Programming | |||
ReDim Problem | Excel Programming | |||
ReDim an Array | Excel Programming |