Loading

Friday, February 20, 2009

The InputBox Function

In Microsoft Excel VBA Macro, to obtain a single input from the user, we can use the InputBox function.
The InputBox function is useful for obtaining a single input from the user. Here is the InputBox function syntax:

InputBox(prompt[,title][,default])

The arguments:
  • prompt: Required. Text that is displayed in the input box.
  • title: Optional. Text that appears in the input box’s title bar.
  • default: Optional. The default value.

The following is an example of how to use the InputBox function:

Sub AskUserName
ActiveSheet.Range("A1").Value = InputBox("Your name?","Input Name")
End Sub


SHARE TWEET

Thank you for reading this article The InputBox Function With URL https://x-tutorials.blogspot.com/2009/02/inputbox-function.html. Also a time to read the other articles.

0 comments:

Write your comment for this article The InputBox Function above!