Join Curt Frye for an in-depth discussion in this video Acquiring values using an input box or message box, part of Up and Running with VBA in Excel.
When they want to incorporate user input into a program, many Excel coders…prefer to have their users enter data into worksheet cells.…That said, you might find it useful to display a simple dialog box…requesting user input.…In this movie, I'll cover two ways to gain user input: the Message Box and the Input Box.…Before we go over, I will just show you the data that I'm using here.…It's a series of Sales.…The active cell is C7, which contains the value $25,000.00.…With that in mind, I'll press Alt+F11, and show you the code that I'll be working with.…
I've used Message Boxes throughout this course.…As you've seen, you can assign values to variables, and use them as the…prompt for a Message Box.…In this case, I have a Message Box that takes the value from the active cell,…multiplies it by .05 and rounds the value off to two decimal places.…If I press F5 to run the code, we come back to see the active cell, C7, and the…commission based on that, 5% is $1250.…What I haven't shown you so far is that you can create different types of…
- Working in the Visual Basic Editor
- Adding code to a macro
- Creating, exporting, and deleting code modules
- Declaring and using variables
- Managing variable scope
- Defining arrays
- Managing workbooks and worksheets with VBA
- Repeating tasks with loops
- Debugging VBA code
- Cutting, copying, and pasting cell data
- Running and triggering event procedures
Skill Level Advanced
1. Introducing Visual Basic for Applications (VBA)
2. Defining Variables, Constants, and Calculations
3. Adding Logic to Your VBA Code
4. Debugging Your VBA Code
5. Managing Workbook Elements and Data in VBA
6. Adding Advanced Elements to Your Workbook
7. Using Excel Events in Your VBA Code
8. Putting It All Together
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.