Beruflich Dokumente
Kultur Dokumente
1. VBA is:
B. a graphical user interface that allows a novice Excel user to build complex
worksheets.
A. Function builder
B. Query-by-example tool
C. Wizard
D. VBA
A. subroutines
B. routines
C. macros
D. programs
4. Which of the following Excel tools allows you to record a sequence of commands
in Excel and save them?
C. A Sub procedure
A. Binary code
C. Macro language
A. A macro
B. A hyperlink
C. A botnet
D. A rootkit
7. Mr. Joseph is the CEO of a leading manufacturing concern. He wanted his name
and designation to appear in italics on all the spreadsheets of the company's
annual report. Which of the following Excel action should he use to achieve this?
A. A wizard
B. A rootkit
C. A macro
D. A botnet
8. Dan was making a science project. He wanted to automate the two steps of adding
a background theme to the cells and then printing the worksheet. Which of the
following Excel actions can help Dan achieve this?
A. A system program
B. A macro
C. A hyperlink
D. An auto function
D. It is used to automate a series of Excel steps and to set up buttons and dialog
boxes.
10. Which of the following is a built-in function in Excel and does not require a
macro?
11. Which of the following tools enables users to view and edit a VBA macro?
C. Query-by-example tool
12. Which of the following is a component of a macro that performs some action on
or with objects?
A. A Function procedure
B. A Sub procedure
C. A visual procedure
D. A Sub macro
13. Which of the following is a VBA macro that returns a single value?
A. A Sub procedure
B. A Function procedure
C. An Object procedure
D. A Sub Macro
15. Which of the following VBA macros can be used in a worksheet formula?
A. An integrity constraint
B. An Object procedure
C. A primary key
D. A Function procedure
16. Which of the following does a VBA macro manipulate?
A. A constant
B. A variable
C. An object
D. A sub macro
17. A(n) _____ in VBA is an item available for you to control in your code.
A. constant
B. object
C. sub macro
D. variable
18. Which of the following refers to a place used to store a piece of information in
Excel?
A. A cell
B. A variable
C. A macro
D. A field
19. Which of the following keys will you press to activate the VBE when Excel is active?
A. Ctrl+F9
B. Ctrl+V
C. Alt+F11
D. Alt+V
20. When working on a worksheet, Ben was editing his macros using the Visual Basic
Editor (VBE). After a while he wanted to go back to the Excel application interface.
Which of the following key(s) should Ben use to toggle between the Excel
application interface and the VBE?
A. Ctrl+F9
B. Ctrl+V
C. Alt+F11
D. Alt+V
21. Which of the following VBA windows shows every workbook that is currently open
in Excel?
A. Ctrl+F11
B. Ctrl+W
C. Alt+W
D. Ctrl+R
23. Which of the following is true about the Project Explorer window?
D. It shows you the properties that can be changed for the currently active object
in the Project Explorer window.
24. Which of the following VBA windows will you use to debug your VBA code?
A. Ctrl+W
B. Ctrl+G
C. Alt+W
D. Ctrl+I
A. It shows you the properties that can be changed for the currently active object
in the Project Explorer window.
27. When you record a macro, Excel automatically inserts a VBA _____ to hold the
recorded code.
A. constant
B. object
C. module
D. variable
28. When entering code directly into a module, which key should be used to indent
some of the lines to make the code easier to read?
A. Tab
B. Shift
C. Ctrl
D. Alt
29. While entering a VBA code directly, to continue a single line of code from one line
to the next, end the first line with:
30. Sub procedures start with the keyword Sub followed by the name of the procedure
and opening and closing:
A. double quotes.
B. parentheses.
C. single quotes.
D. guillemets.
31. Which of the following statements is true of a user defined function?
A. A macro
B. A For-Next loop
C. An assignment
D. A comment
33. With which of the following would you begin a comment line?
A. A single quote
B. A double quote
C. An underscore
D. An equal sign
34. Which of the following elements of VBA programming may change during the
execution of a procedure?
A. A constant
B. A variable
C. A comment
D. A macro
35. Which of the following would be considered a named element whose value would
not change during the execution of a procedure?
A. A variable
B. A constant
C. A comment
D. A macro
36. Which of the following data type uses 2 bytes and whose range of values is true or
false?
A. Boolean
B. Integer
C. Double (negative)
D. Double (positive)
37. Which of the following data type uses 1 byte per character and whose range of
values varies?
A. Boolean
B. String
C. Integer
D. Currency
38. Excel and VBA can work with both numbers and text. Text is often referred to as
____.
A. a variable
B. an object
C. a string
D. a subroutine
39. What type of strings theoretically can hold as many as 2 billion characters?
A. Recurring-length strings
B. Definite-length strings
C. Fixed-length strings
D. Variable-length strings
40. Which of the following options would describe the process of creating variables
simply by using them?
41. Which of the following describes the process of defining the names of all the
variables you are going to use, before you use them in your code?
42. Which of the following is used to declare an explicit variable with VBA code?
A. A Dim statement
B. A comment
C. An assignment statement
D. A string
43. In VBA, dates and times are placed between two:
A. ~ symbols.
B. # symbols.
C. * symbols.
D. " symbols.
44. Which of the following is a VBA statement that allocates the result of an expression
to a variable or an object?
A. A Dim statement
B. A function statement
C. An assignment statement
D. A detail statement
45. In VBA, which of the following symbols represents the exponentiation operator?
A. ^
B. *
C. /
D. &
46. In VBA, which of the following logical operators performs the function of
conjunction on two expressions?
A. And
B. Eqv
C. XoR
D. Imp
47. In VBA, which of the following logical operators performs the function of
disjunction on two expressions?
A. Not
B. Or
C. And
D. XoR
48. In VBA, which of the following logical operators performs the function of exclusion
on two expressions?
A. And
B. Eqv
C. XoR
D. Imp
49. In VBA, which of the following logical operators performs the function of negation
on an expression?
A. XoR
B. Or
C. Imp
D. Not
50. Which of the following operators has the highest precedence in VBA?
A. Division
B. Addition
C. Multiplication
D. Exponentiation
51. Which of the following is true about the way a macro works?
D. It starts at the code's beginning and progresses line by line to the end
52. Which of the following statements is VBA's most important control structure?
A. For-Next
B. If-Then
C. Do-Until
D. Do-While
53. When you want to execute one or more statements conditionally, what VBA
structure would you use?
A. If-Then
B. Do-While
C. For-Next
D. Do-Until
A. If-Then
B. Select-Case
C. Looping
D. Do-While
55. When VBA executes a Select Case structure, the structure is exited:
56. Which of the following terms refers to repeating a block of statements or code
numerous times?
A. Redacting
B. Linking
C. Looping
D. Concatenating
A. Do-While
B. Do-Else
C. Do-Until
D. For-Next
58. Which VBA loop structure is controlled by a counter variable, which starts at one
value and stops at another value?
A. For-Next
B. Do-Until
C. Do-While
D. Else
59. In which of the following VBA structures, a macro continues to execute the loop
until a specified condition is met?
A. For-Next loop
B. If-Then loop
C. Do-While loop
D. Do-Next loop
60. Which of the following is true about the Do-Until loop structure?
A. In a Do-Until loop, the macro executes the loop until the condition is false.
True False
True False
63. To use VBA in an Excel worksheet, you must purchase a separate plug-in module.
True False
64. The macro recorder is a software tool that lets you record a sequence of
commands in Excel and save them as a macro.
True False
True False
True False
67. You can use VBA to create your own worksheet functions.
True False
68. A VBA macro can be used to print your company name and logo at the top of all
worksheets.
True False
69. You can customize the Excel toolbars with your own buttons that execute the
macros you write.
True False
70. The Visual Basic Editor is used to record a sequence of commands in Excel to save
them in a macro.
True False
True False
72. You view and edit VBA macros using the Function procedure.
True False
73. A variable in VBA is an item available for you to control in your code.
True False
74. Excel must be running before a VBA macro can be edited using the VB editor.
True False
75. The quickest way to activate the VBE is to press Ctrl + F11 when Excel is active.
True False
76. If the Project Window is not visible in VBE, press the Ctrl + W to open it.
True False
True False
78. A single VBA module can store any number of Sub procedures, Function
procedures, and declarations.
True False
79. When typing code directly into a VBA macro, the Ctrl key is used to indent some of
the lines to make the code easier to read.
True False
80. When saving an Excel workbook, any macro that has been created will
automatically get saved within the workbook.
True False
81. Excel's VBA macro recorder makes it easy to record user defined functions.
True False
True False
True False
84. To assign a value to a variable, you must use the equal sign operator.
True False
85. It is permissible to use spaces when assigning variable names.
True False
86. Excel and VBA can work with both numbers and text.
True False
True False
True False
True False
90. A macro is a VBA procedure that starts executing the code at the beginning and
progresses line by line until it reaches the end.
True False
91. The Select Case structure is used for decisions involving 2 options.
True False
92. The term looping refers to repeating a block of statements or code numerous
times.
True False
93. In a Do-While loop, the macro executes the loop until the condition is true.
True False
94. _____ extends and customizes Excel, allowing you to do things that Excel itself is
not able to do, such as calculating values in cells based on user input values.
________________________________________
________________________________________
96. The _____ is a software tool that lets you record a sequence of commands in Excel
and save them as a macro.
________________________________________
________________________________________
98. A(n) _____ is a set of programming instructions that performs some action on or
with objects.
________________________________________
________________________________________
________________________________________
101.A(n) _____ can be used in VBA macro to store such things as values, text, or
property settings (such as a font color or alignment).
________________________________________
102.The _____ is a separate application where you write and edit your Visual Basic
macros.
________________________________________
103.The quickest way to activate the Visual Basic Editor (VBE) is to press _____ when
Excel is active.
________________________________________
104.In the Visual Basic Editor (VBE), the _____ window displays a tree diagram that
consists of every workbook currently open in Excel.
________________________________________
105.The _____ window is most useful for executing VBA statements directly and for
debugging code.
________________________________________
106.When you're working in the Visual Basic Editor (VBE), each Excel workbook that's
open is known as a(n) ____.
________________________________________
107._____ is a type of code which consists of one or more statements that you provide
to VBA.
________________________________________
108.All macros reside in code modules of which there are two types: _____ and _____
modules.
________________________________________
________________________________________
110.If the function you need is not already in Excel, you can write your own _____ using
VBA.
________________________________________
________________________________________
112.To assign a value to a variable, you must use the _____ operator.
________________________________________
113.When assigning variable names, you can use letters, numbers, and some
punctuation characters, but the first character must be a(n) ____.
________________________________________
114.In the context of the elements of VBA programming, a(n) _____ is a named element
whose value doesn't change.
________________________________________
115.A(n) _____ data type uses 2 bytes and its range of values is True or False.
________________________________________
116.Excel and Visual Basic for Applications (VBA) can work with both numbers and text.
Text is often referred to as a(n) ____.
________________________________________
________________________________________
118.If you want to declare a variable explicitly, you do so using a _____ statement.
________________________________________
119.A(n) _____ is a VBA statement that assigns the result of an expression to a variable
or an object.
________________________________________
120.In the context of the precedence order for operators in VBA, _____ has the highest
precedence.
________________________________________
121.Some Visual Basic for Applications (VBA) procedures, such as ____, always start at
the code's beginning and progress line by line to the end, never deviating from
this top-to-bottom flow.
________________________________________
122.In the context of the standard structured decision offered by VBA, the _____
structure is suggested for decisions involving three or more options.
________________________________________
123.The term _____ refers to repeating a block of statements or code numerous times.
________________________________________
124.A(n) _____ loop continues to execute until a specified condition has been met.
________________________________________
125.In a _____ loop, the macro executes the loop until the condition is true.
________________________________________
Module M Programming in Excel with VBA Answer Key
1. VBA is:
B. a graphical user interface that allows a novice Excel user to build complex
worksheets.
VBA, which stands for Visual Basic for Applications, is a programming language
developed by Microsoft. Excel, along with the other members of Microsoft
Office, includes the VBA language. VBA extends and customizes Excel, allowing
you to do things that Excel itself is not able to do, such as calculating values in
cells based on user input values.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
2. Which of the following Excel tools allows you to automate the building and
running of complex calculations that are not included in the standard set of
Excel functions?
A. Function builder
B. Query-by-example tool
C. Wizard
D. VBA
VBA extends and customizes Excel, allowing you to do things that Excel itself is
not able to do, such as calculating values in cells based on user input values.
AACSB: Technology
Blooms: Understand
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 2 Medium
Topic: Introduction
3. Units of VBA code are often referred to as ____.
A. subroutines
B. routines
C. macros
D. programs
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
4. Which of the following Excel tools allows you to record a sequence of
commands in Excel and save them?
C. A Sub procedure
The macro recorder is a software tool that lets you record a sequence of
commands in Excel and save them as a macro. This is invaluable if you are
struggling with some programming syntax. Just get the recorder to do it for you
and then view the code to see how it is done.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
5. Which of the following is a programming language that includes build-in
commands that mimic the functionality available from menus and dialog boxes
within an application?
A. Binary code
C. Macro language
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Why VBA?
6. Which of the following is a set of Excel actions recorded or written by a user?
A. A macro
B. A hyperlink
C. A botnet
D. A rootkit
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Why VBA?
7. Mr. Joseph is the CEO of a leading manufacturing concern. He wanted his name
and designation to appear in italics on all the spreadsheets of the company's
annual report. Which of the following Excel action should he use to achieve
this?
A. A wizard
B. A rootkit
C. A macro
D. A botnet
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
A. A system program
B. A macro
C. A hyperlink
D. An auto function
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
D. It is used to automate a series of Excel steps and to set up buttons and dialog
boxes.
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
This term means that a series of steps is completed automatically.
AACSB: Technology
Blooms: Understand
Learning Objective: M-02 Define a macro.
Level of Difficulty: 2 Medium
Topic: Why VBA?
10. Which of the following is a built-in function in Excel and does not require a
macro?
Some common uses for VBA macros: Developing new worksheet functions—
Although Excel includes numerous built-in functions (such as SUM and
AVERAGE), you can create custom worksheet functions that can greatly simplify
your formulas.
AACSB: Technology
Blooms: Understand
Learning Objective: M-02 Define a macro.
Level of Difficulty: 2 Medium
Topic: Why VBA?
11. Which of the following tools enables users to view and edit a VBA macro?
C. Query-by-example tool
You perform actions in VBA by writing (or recording) code in a VBA macro. You
view and edit VBA macros using the Visual Basic Editor (VBE).
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
12. Which of the following is a component of a macro that performs some action
on or with objects?
A. A Function procedure
B. A Sub procedure
C. A visual procedure
D. A Sub macro
AACSB: Technology
Blooms: Understand
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 2 Medium
Topic: Why VBA?
13. Which of the following is a VBA macro that returns a single value?
A. A Sub procedure
B. A Function procedure
C. An Object procedure
D. A Sub Macro
A VBA macro can also have Function procedures. A Function procedure is a VBA
macro that returns a single value.
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
14. Which of the following is true about Function procedures?
A VBA macro can also have Function procedures. A Function procedure is a VBA
macro that returns a single value.
AACSB: Technology
Blooms: Understand
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 2 Medium
Topic: Why VBA?
15. Which of the following VBA macros can be used in a worksheet formula?
A. An integrity constraint
B. An Object procedure
C. A primary key
D. A Function procedure
A VBA macro can also have Function procedures. A Function procedure is a VBA
macro that returns a single value. You can call it from another VBA macro or
even use it as a function in a worksheet formula.
AACSB: Technology
Blooms: Understand
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 2 Medium
Topic: Why VBA?
16. Which of the following does a VBA macro manipulate?
A. A constant
B. A variable
C. An object
D. A sub macro
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
17. A(n) _____ in VBA is an item available for you to control in your code.
A. constant
B. object
C. sub macro
D. variable
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
18. Which of the following refers to a place used to store a piece of information in
Excel?
A. A cell
B. A variable
C. A macro
D. A field
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
19. Which of the following keys will you press to activate the VBE when Excel is
active?
A. Ctrl+F9
B. Ctrl+V
C. Alt+F11
D. Alt+V
The quickest way to activate the VBE is to press Alt + F11 when Excel is active. To
return to Excel, press Alt + F11 again. (Alt + F11 acts as a toggle between the
Excel application interface and the VBE.)
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
20. When working on a worksheet, Ben was editing his macros using the Visual
Basic Editor (VBE). After a while he wanted to go back to the Excel application
interface. Which of the following key(s) should Ben use to toggle between the
Excel application interface and the VBE?
A. Ctrl+F9
B. Ctrl+V
C. Alt+F11
D. Alt+V
The quickest way to activate the VBE is to press Alt + F11 when Excel is active. To
return to Excel, press Alt + F11 again. (Alt + F11 acts as a toggle between the
Excel application interface and the VBE.)
AACSB: Technology
Blooms: Understand
Learning Objective: M-04 Describe an object.
Level of Difficulty: 2 Medium
Topic: The Visual Basic Editor
21. Which of the following VBA windows shows every workbook that is currently
open in Excel?
The Project Explorer window displays a tree diagram that consists of every
workbook currently open in Excel.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
22. Which of the following key(s) will display the Project Explorer window if it is not
visible on the VBE Program Window?
A. Ctrl+F11
B. Ctrl+W
C. Alt+W
D. Ctrl+R
The Project Explorer window displays a tree diagram that consists of every
workbook currently open in Excel. If the Project Explorer window is not visible,
press Ctrl + R or choose View, then the Project Explorer command.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
23. Which of the following is true about the Project Explorer window?
D. It shows you the properties that can be changed for the currently active
object in the Project Explorer window.
The Properties window shows you the properties that can be changed for the
currently active object in the Project Explorer window. For example, the
ScrollArea property can restrict users to that area of the worksheet.
AACSB: Technology
Blooms: Understand
Learning Objective: M-04 Describe an object.
Level of Difficulty: 2 Medium
Topic: The Visual Basic Editor
24. Which of the following VBA windows will you use to debug your VBA code?
The Immediate window is most useful for executing VBA statements directly and
for debugging your code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
25. Which of the following key(s) will display the Immediate Window if it is not
visible on the VBE Program Window?
A. Ctrl+W
B. Ctrl+G
C. Alt+W
D. Ctrl+I
The Immediate window may or may not be visible. If it isn't visible, press Ctrl + G
or choose the View, then the Immediate Window command.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
26. Which of the following is true about the Immediate window?
A. It shows you the properties that can be changed for the currently active
object in the Project Explorer window.
The Immediate window is most useful for executing VBA statements directly and
for debugging your code.
AACSB: Technology
Blooms: Understand
Learning Objective: M-04 Describe an object.
Level of Difficulty: 2 Medium
Topic: The Visual Basic Editor
27. When you record a macro, Excel automatically inserts a VBA _____ to hold the
recorded code.
A. constant
B. object
C. module
D. variable
When you record a macro, Excel automatically inserts a VBA module (by default
it is named Module1) to hold the recorded code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
28. When entering code directly into a module, which key should be used to indent
some of the lines to make the code easier to read?
A. Tab
B. Shift
C. Ctrl
D. Alt
When you are entering your code directly, you use the Tab key to indent some
of the lines to make your code easier to read.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
29. While entering a VBA code directly, to continue a single line of code from one
line to the next, end the first line with:
A single line of VBA code can become very long. Therefore, you may want to
use the line continuation character to break up lengthy lines of code. To
continue a single line of code from one line to the next, end the first line with a
space followed by an underscore (_), then continue the statement on the next
line.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
30. Sub procedures start with the keyword Sub followed by the name of the
procedure and opening and closing:
A. double quotes.
B. parentheses.
C. single quotes.
D. guillemets.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: VBA Building Blocks
31. Which of the following statements is true of a user defined function?
If the function you need is not already in Excel, you can write your own user
defined function (or UDF) using VBA. UDFs can reduce the complexity of a
worksheet. UDFs can increase productivity when many users have to repeatedly
use the same calculation procedures.
AACSB: Technology
Blooms: Understand
Learning Objective: M-04 Describe an object.
Level of Difficulty: 2 Medium
Topic: VBA Building Blocks
32. Which of the following is the simplest type of VBA statement?
A. A macro
B. A For-Next loop
C. An assignment
D. A comment
A comment is the simplest type of VBA statement. Because VBA ignores these
statements, they can consist of anything you want. You can insert a comment to
remind yourself why you did something or to clarify a piece of code you wrote.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
33. With which of the following would you begin a comment line?
A. A single quote
B. A double quote
C. An underscore
D. An equal sign
You begin a comment with a single quote (‘). VBA ignores any text that follows a
single quote in a line of code. You can use a complete line for your comment or
insert your comment at the end of a line of code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
34. Which of the following elements of VBA programming may change during the
execution of a procedure?
A. A constant
B. A variable
C. A comment
D. A macro
A variable's value may (and usually does) change while your procedure is
executing.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
35. Which of the following would be considered a named element whose value
would not change during the execution of a procedure?
A. A variable
B. A constant
C. A comment
D. A macro
Sometimes, you need to refer to a value or string that never changes, in other
words, a constant. A constant is a named element whose value doesn't change.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
36. Which of the following data type uses 2 bytes and whose range of values is true
or false?
A. Boolean
B. Integer
C. Double (negative)
D. Double (positive)
There are many different data types that are used in Visual Basic Applications.
Boolean data type uses 2 bytes and its range of values is true or false.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
37. Which of the following data type uses 1 byte per character and whose range of
values varies?
A. Boolean
B. String
C. Integer
D. Currency
There are many different data types that are used in Visual Basic Applications.
String data type uses 1 byte per character and its range of values varies.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
38. Excel and VBA can work with both numbers and text. Text is often referred to as
____.
A. a variable
B. an object
C. a string
D. a subroutine
Excel and VBA can work with both numbers and text. Text is often referred to as
a string.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
39. What type of strings theoretically can hold as many as 2 billion characters?
A. Recurring-length strings
B. Definite-length strings
C. Fixed-length strings
D. Variable-length strings
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
40. Which of the following options would describe the process of creating variables
simply by using them?
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
41. Which of the following describes the process of defining the names of all the
variables you are going to use, before you use them in your code?
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
42. Which of the following is used to declare an explicit variable with VBA code?
A. A Dim statement
B. A comment
C. An assignment statement
D. A string
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
43. In VBA, dates and times are placed between two:
A. ~ symbols.
B. # symbols.
C. * symbols.
D. " symbols.
In VBA, dates and times are placed between two hash marks, i.e., the # symbols.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
44. Which of the following is a VBA statement that allocates the result of an
expression to a variable or an object?
A. A Dim statement
B. A function statement
C. An assignment statement
D. A detail statement
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
45. In VBA, which of the following symbols represents the exponentiation operator?
A. ^
B. *
C. /
D. &
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
46. In VBA, which of the following logical operators performs the function of
conjunction on two expressions?
A. And
B. Eqv
C. XoR
D. Imp
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
47. In VBA, which of the following logical operators performs the function of
disjunction on two expressions?
A. Not
B. Or
C. And
D. XoR
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
48. In VBA, which of the following logical operators performs the function of
exclusion on two expressions?
A. And
B. Eqv
C. XoR
D. Imp
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
49. In VBA, which of the following logical operators performs the function of
negation on an expression?
A. XoR
B. Or
C. Imp
D. Not
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
50. Which of the following operators has the highest precedence in VBA?
A. Division
B. Addition
C. Multiplication
D. Exponentiation
The precedence order for operators in VBA is exactly the same as in Excel
formulas. Exponentiation has the highest precedence. Multiplication and division
come next, followed by addition and subtraction.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
51. Which of the following is true about the way a macro works?
D. It starts at the code's beginning and progresses line by line to the end
Some VBA procedures start at the code's beginning and progress line by line to
the end, never deviating from this top-to-bottom flow. Macros that you record
always work like this.
AACSB: Technology
Blooms: Understand
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 2 Medium
Topic: Decisions, Decisions, Decisions
52. Which of the following statements is VBA's most important control structure?
A. For-Next
B. If-Then
C. Do-Until
D. Do-While
The If-Then statement is VBA's most important control structure. Use the If-Then
structure when you want to execute one or more statements conditionally.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
53. When you want to execute one or more statements conditionally, what VBA
structure would you use?
A. If-Then
B. Do-While
C. For-Next
D. Do-Until
Use the If-Then structure when you want to execute one or more statements
conditionally.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
54. Which of the following VBA structures is recommended in a decision involving
three or more options?
A. If-Then
B. Select-Case
C. Looping
D. Do-While
The Select Case structure is useful for decisions involving three or more options
(although it also works with two options, providing an alternative to the If-Then
structure).
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
55. When VBA executes a Select Case structure, the structure is exited:
When VBA executes a Select Case structure, the structure is exited as soon as
VBA finds a true case.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
56. Which of the following terms refers to repeating a block of statements or code
numerous times?
A. Redacting
B. Linking
C. Looping
D. Concatenating
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
57. Which of the following is the simplest type of looping statement?
A. Do-While
B. Do-Else
C. Do-Until
D. For-Next
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
58. Which VBA loop structure is controlled by a counter variable, which starts at one
value and stops at another value?
A. For-Next
B. Do-Until
C. Do-While
D. Else
AACSB: Technology
Blooms: Understand
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 2 Medium
Topic: Decisions, Decisions, Decisions
59. In which of the following VBA structures, a macro continues to execute the loop
until a specified condition is met?
A. For-Next loop
B. If-Then loop
C. Do-While loop
D. Do-Next loop
AACSB: Technology
Blooms: Understand
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 2 Medium
Topic: Decisions, Decisions, Decisions
60. Which of the following is true about the Do-Until loop structure?
A. In a Do-Until loop, the macro executes the loop until the condition is false.
The Do-Until loop structure is similar to the Do-While structure. The two
structures differ in their handling of the tested condition. A macro continues to
execute a Do-While loop while the condition remains true. In a Do-Until loop,
the macro executes the loop until the condition is true.
AACSB: Technology
Blooms: Understand
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 2 Medium
Topic: Decisions, Decisions, Decisions
FALSE
VBA, which stands for Visual Basic for Applications, is a programming language
developed by Microsoft. Excel, along with the other members of Microsoft
Office, includes the VBA language.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
FALSE
Units of VBA code are often referred to as macros. Although this module covers
more formal terminology, the term macro will be used as a general way to refer
to any VBA code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Introduction
63. To use VBA in an Excel worksheet, you must purchase a separate plug-in
module.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
64. The macro recorder is a software tool that lets you record a sequence of
commands in Excel and save them as a macro.
TRUE
The macro recorder is a software tool that lets you record a sequence of
commands in Excel and save them as a macro. This is invaluable if you are
struggling with some programming syntax. Just get the recorder to do it for you
and then view the code to see how it is done.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
65. VBA is only a programming language and not a macro language.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Why VBA?
TRUE
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
This term means that a series of steps is completed automatically.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Why VBA?
67. You can use VBA to create your own worksheet functions.
TRUE
You can use VBA to create your own worksheet functions. If you have a complex
calculation that you use frequently that is not included in the set of standard
Excel functions (such as a tax calculation or a specialized scientific formula), you
can write your own user-defined function.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Why VBA?
68. A VBA macro can be used to print your company name and logo at the top of
all worksheets.
TRUE
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Why VBA?
69. You can customize the Excel toolbars with your own buttons that execute the
macros you write.
TRUE
A common use of VBA macros is creating a custom toolbar button where you
can customize the Excel toolbars with your own buttons that execute the macros
you write.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Why VBA?
70. The Visual Basic Editor is used to record a sequence of commands in Excel to
save them in a macro.
FALSE
You perform actions in VBA by writing (or recording) code in a VBA macro. You
view and edit VBA macros using the Visual Basic Editor (VBE).
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
71. A Sub procedure is a VBA macro that returns a single value.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
72. You view and edit VBA macros using the Function procedure.
FALSE
A VBA macro can also have Function procedures. A Function procedure is a VBA
macro that returns a single value.
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
73. A variable in VBA is an item available for you to control in your code.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
74. Excel must be running before a VBA macro can be edited using the VB editor.
TRUE
You can't run the VBE separately; Excel must be running in order for the VBE to
operate.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
75. The quickest way to activate the VBE is to press Ctrl + F11 when Excel is active.
FALSE
The quickest way to activate the VBE is to press Alt + F11 when Excel is active.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
76. If the Project Window is not visible in VBE, press the Ctrl + W to open it.
FALSE
If the Project Explorer window is not visible, press Ctrl + R or choose View, then
the Project Explorer command.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
77. When working in VBE, an object is considered as a collection of projects.
FALSE
When you're working in the VBE, each Excel workbook that's open is a project.
You can think of a project as a collection of objects arranged as an outline.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
78. A single VBA module can store any number of Sub procedures, Function
procedures, and declarations.
TRUE
A single VBA module can store any number of Sub procedures, Function
procedures, and declarations. How you organize a VBA module is completely up
to you. Some people prefer to keep all their VBA code for an application in a
single VBA module; others like to split up the code into several different
modules.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
79. When typing code directly into a VBA macro, the Ctrl key is used to indent some
of the lines to make the code easier to read.
FALSE
When you are entering your code directly, you use the Tab key to indent some
of the lines to make your code easier to read.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
80. When saving an Excel workbook, any macro that has been created will
automatically get saved within the workbook.
TRUE
When you save an Excel workbook, any macro that you have created
automatically gets saved within the workbook, so there is nothing different or
new you need to do other than clicking on File, Save.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
81. Excel's VBA macro recorder makes it easy to record user defined functions.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: VBA Building Blocks
FALSE
A comment is the simplest type of VBA statement. Because VBA ignores these
statements, they can consist of anything you want. You can insert a comment to
remind yourself why you did something or to clarify a piece of code you wrote.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
83. In a VBA statement, a comment begins with a double quote (").
FALSE
You begin a comment with a single quote (‘). VBA ignores any text that follows a
single quote in a line of code. You can use a complete line for your comment or
insert your comment at the end of a line of code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
84. To assign a value to a variable, you must use the equal sign operator.
TRUE
You have lots of flexibility in naming your variables, so make the variable names
as descriptive as possible. You assign a value to a variable using the equal sign
operator.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
85. It is permissible to use spaces when assigning variable names.
FALSE
VBA enforces a few rules regarding variable names of which one is that you
cannot use any spaces or periods in a variable name.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
86. Excel and VBA can work with both numbers and text.
TRUE
Excel and VBA can work with both numbers and text. Text is often referred to as
a string.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
87. Variable-length strings theoretically can hold as many as 2 billion characters.
TRUE
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
TRUE
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
89. The operator XoR performs the logical inclusion on an expression.
FALSE
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
90. A macro is a VBA procedure that starts executing the code at the beginning and
progresses line by line until it reaches the end.
TRUE
Some VBA procedures start at the code's beginning and progress line by line to
the end, never deviating from this top-to-bottom flow. Macros that you record
always work like this.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
91. The Select Case structure is used for decisions involving 2 options.
TRUE
The Select Case structure is useful for decisions involving three or more options
(although it also works with two options, providing an alternative to the If-Then
structure).
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
92. The term looping refers to repeating a block of statements or code numerous
times.
TRUE
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
93. In a Do-While loop, the macro executes the loop until the condition is true.
FALSE
A macro continues to execute a Do-While loop while the condition remains true.
In a Do-Until loop, the macro executes the loop until the condition is true.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
VBA, which stands for Visual Basic for Applications, is a programming language
developed by Microsoft. Excel, along with the other members of Microsoft
Office, includes the VBA language. VBA extends and customizes Excel, allowing
you to do things that Excel itself is not able to do, such as calculating values in
cells based on user input values.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
macros
Units of VBA code are often referred to as macros. Although this module covers
more formal terminology, the term macro will be used as a general way to refer
to any VBA code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Introduction
96. The _____ is a software tool that lets you record a sequence of commands in
Excel and save them as a macro.
macro recorder
The macro recorder is a software tool that lets you record a sequence of
commands in Excel and save them as a macro. This is invaluable if you are
struggling with some programming syntax. Just get the recorder to do it for you
and then view the code to see how it is done.
AACSB: Technology
Blooms: Remember
Learning Objective: M-01 Explain the value of using VBA with Excel.
Level of Difficulty: 1 Easy
Topic: Introduction
macro
A macro is a set of actions recorded or written by a user. For instance, you can
create a macro that always prints your name in bold on a spreadsheet. You can
name it PrintName and then reuse the PrintName macro in any spreadsheet.
This term means that a series of steps is completed automatically.
AACSB: Technology
Blooms: Remember
Learning Objective: M-02 Define a macro.
Level of Difficulty: 1 Easy
Topic: Why VBA?
98. A(n) _____ is a set of programming instructions that performs some action on or
with objects.
Sub procedure
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
Function procedure
A VBA macro can also have Function procedures. A Function procedure is a VBA
macro that returns a single value. You can call it from another VBA macro or
even use it as a function in a worksheet formula.
AACSB: Technology
Blooms: Remember
Learning Objective: M-03 Build a simple macro using a Sub procedure and a Function procedure.
Level of Difficulty: 1 Easy
Topic: Why VBA?
100. Visual Basic for Applications (VBA) manipulates ____, such as a workbook, a
worksheet, a cell range, a chart, or a shape.
objects
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
101. A(n) _____ can be used in VBA macro to store such things as values, text, or
property settings (such as a font color or alignment).
variable
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: Why VBA?
102. The _____ is a separate application where you write and edit your Visual Basic
macros.
The Visual Basic Editor (VBE) is a separate application where you write and edit
your Visual Basic macros. You can't run the VBE separately; Excel must be
running in order for the VBE to operate.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
103. The quickest way to activate the Visual Basic Editor (VBE) is to press _____ when
Excel is active.
Alt + F11
The quickest way to activate the VBE is to press Alt + F11 when Excel is active. To
return to Excel, press Alt + F11 again. (Alt + F11 acts as a toggle between the
Excel application interface and the VBE.)
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
104. In the Visual Basic Editor (VBE), the _____ window displays a tree diagram that
consists of every workbook currently open in Excel.
Project Explorer
The Project Explorer window displays a tree diagram that consists of every
workbook currently open in Excel.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
105. The _____ window is most useful for executing VBA statements directly and for
debugging code.
Immediate
The Immediate window is most useful for executing VBA statements directly and
for debugging your code.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
106. When you're working in the Visual Basic Editor (VBE), each Excel workbook that's
open is known as a(n) ____.
project
When you're working in the VBE, each Excel workbook that's open is a project
which is a collection of objects arranged as an outline.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
107. _____ is a type of code which consists of one or more statements that you
provide to VBA.
Declaration
A VBA module can hold several types of code. Declarations are one or more
information statements that you provide to VBA.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: The Visual Basic Editor
108. All macros reside in code modules of which there are two types: _____ and _____
modules.
standard; class
All macros reside in code modules. There are two types of code modules: (1)
standard modules and (2) class modules.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: VBA Building Blocks
Sub
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: VBA Building Blocks
110. If the function you need is not already in Excel, you can write your own _____
using VBA.
If the function you need is not already in Excel, you can write your own user
defined function (or UDF) using VBA. UDFs can reduce the complexity of a
worksheet.
AACSB: Technology
Blooms: Remember
Learning Objective: M-04 Describe an object.
Level of Difficulty: 1 Easy
Topic: VBA Building Blocks
comment
A comment is the simplest type of VBA statement. Because VBA ignores these
statements, they can consist of anything you want. You can insert a comment to
remind yourself why you did something or to clarify a piece of code you wrote.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
112. To assign a value to a variable, you must use the _____ operator.
equal sign
You assign a value to a variable using the equal sign operator. You have lots of
flexibility in naming your variables, so make the variable names as descriptive as
possible.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
113. When assigning variable names, you can use letters, numbers, and some
punctuation characters, but the first character must be a(n) ____.
letter
VBA enforces a few rules regarding variable names, of which one is that you can
use letters, numbers, and some punctuation characters, but the first character
must be a letter.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
114. In the context of the elements of VBA programming, a(n) _____ is a named
element whose value doesn't change.
constant
A variable's value may (and usually does) change while your procedure is
executing. Sometimes, you need to refer to a value or string that never changes,
in other words, a constant. A constant is a named element whose value doesn't
change.
AACSB: Technology
Blooms: Remember
Learning Objective: M-05 Explain the difference between a comment; a variable; and a constant.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
115. A(n) _____ data type uses 2 bytes and its range of values is True or False.
Boolean
Data types are the manner in which data types are stored in memory—for
example, as integers, real numbers, or strings. VBA has a variety of built-in data
types. A Boolean data type uses 2 bytes and its range of values is true or false.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
116. Excel and Visual Basic for Applications (VBA) can work with both numbers and
text. Text is often referred to as a(n) ____.
string
Excel and VBA can work with both numbers and text. Text is often referred to as
a string.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
fixed-length strings
Excel and VBA can work with both numbers and text. Text is often referred to as
a string. Fixed-length strings are declared with a specified number of characters.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
118. If you want to declare a variable explicitly, you do so using a _____ statement.
Dim
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
119. A(n) _____ is a VBA statement that assigns the result of an expression to a
variable or an object.
assignment statement
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
120. In the context of the precedence order for operators in VBA, _____ has the
highest precedence.
exponentiation
Operators play a major role in VBA. The precedence order for operators in VBA
is exactly the same as in Excel formulas. Exponentiation has the highest
precedence. Multiplication and division come next, followed by addition and
subtraction.
AACSB: Technology
Blooms: Remember
Learning Objective: M-06 List the various Visual Basic Application data types and operators.
Level of Difficulty: 1 Easy
Topic: Elements of VBA Programming
121. Some Visual Basic for Applications (VBA) procedures, such as ____, always start
at the code's beginning and progress line by line to the end, never deviating
from this top-to-bottom flow.
macros
Some VBA procedures start at the code's beginning and progress line by line to
the end, never deviating from this top-to-bottom flow. Macros that you record
always work like this.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
122. In the context of the standard structured decision offered by VBA, the _____
structure is suggested for decisions involving three or more options.
Select Case
The Select Case structure is useful for decisions involving three or more options
(although it also works with two options, providing an alternative to the If-Then
structure).
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
123. The term _____ refers to repeating a block of statements or code numerous
times.
looping
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
124. A(n) _____ loop continues to execute until a specified condition has been met.
Do-While
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions
125. In a _____ loop, the macro executes the loop until the condition is true.
Do-Until
The Do-Until loop structure is similar to the Do-While structure. The two
structures differ in their handling of the tested condition. A macro continues to
execute a Do-While loop while the condition remains true. In a Do-Until loop,
the macro executes the loop until the condition is true.
AACSB: Technology
Blooms: Remember
Learning Objective: M-07 Describe and build a macro that uses the If-Then-Else; For-Next; Do-Until; Do-While; and Select Case
structures.
Level of Difficulty: 1 Easy
Topic: Decisions, Decisions, Decisions