|   Home    |    eBooks Home    |    Sample Pages    |
eBooks...

Recording Excel Macros

 

VBA Message & Input Boxes

The Table of Contents below is reproduced from the VBA Message & Input Boxes ebook. You can see a selection of sample pages from the ebook, browse the free extra content, and buy the ebook online by following the links on the left.

Table of Contents

  • About This Book

  • About the Exercises

  • Message Boxes

  • The Anatomy of the Message Box

    • Message Box Title

    • Message Box Icons

    • Message Box Buttons

  • Programming Message Boxes

    • The MsgBox Method for Simple Messages

      • Step-by-Step: A Simple Information Message

    • Multi-line Messages

      • Step-by-Step: A Multi-Line Message

    • The MsgBox Function for Multi-Button Messages

      • Step-by-Step: Evaluating a Yes/No Response with an If Statement

      • Evaluating a Yes/No/Cancel Response with a Case Statement

      • Setting the Default Button

    • Using the Help Button

    • Modal Message Boxes

    • Writing Long Messages

    • Including Data in Messages

    • Coping with Quote Marks

    • Being Creative with Titles

    • Using Constants for Consistency

    • Using Numbered Items and Bullet Points

    • Things You Can't Do with a Message Box

  • Input Boxes

    • The Anatomy of the Input Box

  • Programming Input Boxes

    • The VBA InputBox Function

      • Accepting Input from the User

      • Checking the User's Response

      • Let the User Try Again

      • What If the User Cancels?

      • Supplying a Default Value

    • Excel's InputBox Method

      • Declaring a Data Type for the Input Box Value

      • If the User Enters the Wrong Data Type

      • If the User Cancels the Input Box

      • Working with Input Formulas (Type 0)

      • Working with Input Numbers (Type 1)

      • Working with Input Text (Type 2)

      • Working with Logical Values (Type 4)

      • Working with Cell References (Type 8)

      • Working with Error Values (Type 16)

      • Working with Arrays of Values (Type 64)

  • Step-by-Step: Exploring Message Boxes

    • Part 1: Prepare the Workbook

    • Part 2: Write the Basic Macro

    • Part 3: Add a Confirmation Message

    • Part 4: Test the Macro

    • Part 5: Add a Timer

    • Part 6: Add Statistics to the Confirmation Message

    • Part 7: Let the User Choose the Minimum Number

    • Part 8: Add an Error Handler

    • Final Code Listing for the MessageDemo Macro

    • Flow Diagram for the MessageDemo Macro

  • Appendix: VBA Message Box Constants

  • Notes and Further Information

    • About the Author

    • Copyright

    • Limitation of Liability

 

^ top
 

Hit Counter