From the course: Excel: Learning VBA

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Acquire values using an input box or message box

Acquire values using an input box or message box - Microsoft Excel Tutorial

From the course: Excel: Learning VBA

Acquire values using an input box or message box

- [Instructor] Many Excel programmers prefer to have their users enter data into worksheet cells when they need a value for their subroutines. That said, you might find it useful to display a simple dialogue box requesting user input. In this movie, I will cover two ways that you can use to get that user input. The message box and the input box. My sample file is "06_03_Boxes," and you can find it in the chapter six folder of the "Exercise Files" collection. In this workbook, I have a single worksheet, and I have sales data for the month of January and for five different varieties of olive oil. And also, I have buttons that will run for different subroutines that I have available in the Visual Basic editor. So, I'll press Alt, F11 and move there now so we can take a look at the code. In the Visual Basic editor at the top in my code module, I have a subroutine called "Display Commission." And what this does is take the…

Contents