Quiz: Excel Macros

Main.ExcelQuiz6 History

Hide minor edits - Show changes to output

May 05, 2022, at 03:55 PM by 10.37.6.74 -
Added lines 1-73:
(:title Quiz: Excel Macros:)
(:keywords quiz, test, Python, variable, Macro, VBA, Visual Basic, Applications, course:)
(:description Learning assessment on Excel Visual Basic for Applications (VBA). VBA Macros are recorded and edited to customize and automate Excel workflows:)

----

'''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

-->(:toggle hide q1a button show="Select":)
(:div id=q1a:)
-->%red%Incorrect.%%  xls (older Excel versions) and xlsx (new Excel version) are the file extensions for regular workbooks (not macro-enabled).
(:divend:)

->'''B.''' xl

-->(:toggle hide q1b button show="Select":)
(:div id=q1b:)
-->%red%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".
(:divend:)

->'''C.''' xlsm

-->(:toggle hide q1c button show="Select":)
(:div id=q1c:)
-->%blue%Correct.%%  The file extension is xlsm to indicate and Excel file (xls) that is macro-enabled (+m).
(:divend:)

----

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

->'''A.''' True

-->(:toggle hide q2a button show="Select":)
(:div id=q2a:)
-->%blue%Correct.%%
(:divend:)

->'''B.''' False

-->(:toggle hide q2b button show="Select":)
(:div id=q2b:)
-->%red%Incorrect.%%
(:divend:)

----

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

->'''A.''' myValue = ActiveSheet.Range(A5).Value

-->(:toggle hide q3a button show="Select":)
(:div id=q3a:)
-->%red%Incorrect.%% The cell reference needs to be a string "A5".
(:divend:)

->'''B.''' myValue = ActiveSheet.Range("A5").Value​​

-->(:toggle hide q3b button show="Select":)
(:div id=q3b:)
-->%blue%Correct.%% 
(:divend:)

->'''C.''' myValue is ActiveSheet.Range(A5).Value

-->(:toggle hide q3c button show="Select":)
(:div id=q3c:)
-->%red%Incorrect.%%  Use an equal sign (=), not "is".
(:divend:)

----