Input Boxes (VB.NET)
Public Function InputBox( _
ByVal Prompt As String,
_
Optional ByVal Title As String = "",
_
Optional ByVal DefaultResponse As String = "",
_
Optional ByVal XPos As Integer = -1,
_
Optional ByVal YPos As Integer =
-1 _
) As String
To generate an input box and "capture" its returned value, use a line like the following:
numElements = InputBox("Enter a number between 3 and 9.")
You can add parameters for title and default value as well.
numElements = InputBox("Enter a number between 3 and 9.", "Invalid entry", 3)