:
This message was edited by lionb at 2005-12-7 7:16:45
: : Hello,
: :
: : I am using an string array to store a large text in a for loop. When the control moves to next , i want to clear the array value and store new value.some times the following Error comes.
: :
: : "un-time error '-2147418113(8000ffff)
: : scan line index out of range"
: :
: : Please Help me How to resolve this Problem.
: :
: : Thanks and Regards,
: :
: : P.Gerald Manickam
: :
: :
: To clear all elements in Array you can use Erase Statement. See code example here:
:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vastmerasex.asp
: To do manipulation with single elements you have to go through the loop and set elements' values to NULL/Empty string. Something like that
:
: Fot I = 0 to Ubound(MyArray)
: If I = 10 Then
: MyArray(I) = vbNullString
: end if
: Next
:
:
:
:
Thanks lionb, I had never heard of Erase statement.......learn something new everyday.