Dim i
i=0
Do While True
number=InputBox("Please input a number,input 'Q' to quit","Inputbox")
If IsNumeric(number)and number<>"" Then
ReDim Preserve a(i)
a(i)=number
i=i+1
ElseIf number="Q" Then
MsgBox "The statement is finish now "
Exit Do
Else
MsgBox "Sorry,the number format is failed,Quit now"
Exit Do
End If
Loop
If IsEmpty(a) Then
MsgBox "The array is null,Quit "
Else
For j=LBound(a) To UBound(a)