Search notes:

VBA function: inputBox

inputBox() lets the user enter a string.
option explicit

sub main() ' {

    dim val as string
    val = inputBox("Enter a value")
    debug.print("You entered: " & val)

    val = inputBox("Enter a value", "Title")
    debug.print("You entered: " & val)

    val = inputBox("Enter a value", "Title", "Default value")
    debug.print("You entered: " & val)

  '
  ' Indicate x and y coordinates
  '
    val = inputBox("Enter a value", "Title", "Default value", 100, 50)
    debug.print("You entered: " & val)

end sub ' }
Github repository about-VBA, path: /functions/inputBox.bas

See also

msgBox
The special Excel Application function inputBox (that allows also to enter ranges.
functions

Index