
03-10-2004, 05:43 AM
|
|
Junior Contributor
|
|
Join Date: Feb 2004
Location: Southampton, UK
Posts: 335
|
|
MarathonMan is correct but if you want to call the function from a form just have the call in a button click, the input can either be from a text box or from an input statement
Code:
Private Sub Command1_Click()
Dim n As Integer
n = CInt(Me.Text1)
'compares both answers
MsgBox CStr(HandShake(n)) + ":" + CStr((n * (n - 1)) / 2)
End Sub
|
|