Current Help System: PC-DMIS BASIC (View Core Help)

#### Example:

Sub Form_Click ()

Dim Msg, Number ' Declare variables.

Msg = "Enter a non-negative number."

Number = InputBox(Msg) ' Get user input.

If Number < 0 Then

Msg = "Cannot determine the square root of a negative number."

Else

Msg = "The square root of " & Number & " is "

Msg = Msg & Sqr(Number) & "."

End If

MsgBox Msg ' Display results.

End Sub