Quiz: Excel Macros


1. An Excel workbook must be saved as a Macro-enabled workbook before a VBA program can be included. What is the file extension on a Macro-Enabled Excel workbook?

A. xlsx
Incorrect. xls (older Excel versions) and xlsx (new Excel version) are the file extensions for regular workbooks (not macro-enabled).
B. xl
Incorrect. Missing the additional characters. In Windows, view the file Extensions by selecting Folder Options in a File Explorer with View...Options...View Tab...Unselect "Hide Extensions for known file types".
C. xlsm
Correct. The file extension is xlsm to indicate and Excel file (xls) that is macro-enabled (+m).

2. Visual Basic for Applications (VBA) is a backend programming language for Excel. Programs in VBA are called Macros.

A. True
Correct.
B. False
Incorrect.

3. In VBA, how do you retrieve the value from the current Active Sheet, Cell A5?

A. myValue = ActiveSheet.Range(A5).Value
Incorrect. The cell reference needs to be a string "A5".
B. myValue = ActiveSheet.Range("A5").Value​​
Correct.
C. myValue is ActiveSheet.Range(A5).Value
Incorrect. Use an equal sign (=), not "is".

πŸ’¬