VBA InputBox – Get Input from a User in a Macro

VBA InputBox – Get Input from a User

There are many instances when you may wish to prompt the user for Input from your macro. This is easily done by using an InputBox. The user Input can then be translated into a variable to use in your macros. Here is an example using the most popular features of an InputBox.


The following code does three things:

1. Prompts for input with an InputBox and assigns it to a variable

2. Verify’s input, otherwise exits

3. Returns the input in a message box

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues:

Leave A Comment