событий выбрать Activate, ввести программу.
Private Sub Form_Activate()
Dim A(1 To
100) As IntegerDim i As Byte
Dim k As Integer
k = 2
A(1) = Val(InputBox("", ""))
A(2) = Val(InputBox("", ""))
i = 1
Do Until A(i + 1) = A(i)
A(i + 2) = Val(InputBox("", ""))
i = i + 1
k = k + 1
Loop
For i = 1 To k
Form1.Print A(i);
Next i
Form1.Print
Form1.Print k
End Sub
Программа, в которой вывод идет на форму Form1