Visual Basic for Applications/Expressions

This lesson introduces expressions.

Objectives and Skills
Objectives and skills for using expressions include:
 * Customizing a message box to solicit input from the user
 * Using the InputBox function

Readings

 * 1)  Expression (computer science)
 * 2)  Statement (computer science)
 * 3)  Order of operations
 * 4) Microsoft: Arithmetic Operators
 * 5) Microsoft: Operator Precedence

Activities

 * 1) Arithmetic / Mathematical Operators
 * 2) Review ExcelFunctions.net: VBA Operators and Built-In Functions.
 * 3) Experiment with different arithmetic / mathematical operators to ensure you understand how they work.
 * 4) Order of Operations
 * 5) Review MathsIsFun: Order of Operations.
 * 6) Create a macro that demonstrates the order of operations for VBA operators.
 * 7) Age Calculations
 * 8) Create a macro that asks the user how old they are in years, and then calculate and display their approximate age in months, days, hours, and seconds.
 * 9) Temperature Conversion
 * 10) Review MathsIsFun: Conversion of Temperature.
 * 11) Create a macro that asks the user for a Fahrenheit temperature and then calculate and display the corresponding Celsius temperature or ask the user for a Celsius temperature and then calculate and display the corresponding Fahrenheit temperature.  Include the input temperature in the output display.  For example: 98.6 degrees Fahrenheit is 37 degrees Celsius
 * 12) Area Calculations
 * 13) Review MathsIsFun: Area of Plane Shapes.
 * 14) Create a macro that asks the user for the dimensions of different shapes and then calculate and display the area of the shapes.