Dim RESULTADO(1 To 10) As Long
Dim N As Integer
Private Sub cmdAGREGAR_Click()
Dim I As Byte
Dim txt As String
For I = 1 To UBound(NUMERO)
Do
txt = InputBox("Introduce un número...entre -32767 y 32767", "elemento " & I & " de 10", I)
If Abs(Val(txt)) > 32767 Then
txt = ""
End If
N = Val(txt)
Loop While N = 0
RESULTADO(I) = N * N
Next I
End Sub