You are on page 1of 3

Private Sub CommandButton1_Click()

Dim V(1 To 5) As Integer

For i = 1 To 5 Step 1

V(i) = InputBox("Ingrezse Datos:")

ListBox1.AddItem (V(i))

Next i

End Sub
Private Sub CommandButton1_Click()

Dim V(1 To 5) As Integer

For i = 1 To 5 Step 1

V(i) = InputBox("Ingrezse Datos:")

ListBox1.AddItem (V(i))

Next i

For i = 1 To 4 Step 1

For j = i + 1 To 5 Step 1

If V(i) > V(j) Then

aux = V(i)

V(i) = V(j)

V(j) = aux

End If

Next j

Next i

For i = 1 To 5 Step 1
ListBox2.AddItem (V(i))

Next i

End Sub

You might also like