Deck 12: Expanding Excel With Visual Basic for Applications
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/150
Play
Full screen (f)
Deck 12: Expanding Excel With Visual Basic for Applications
1
When you hide screen elements that are part of the worksheet,they will be hidden in that worksheet only.
True
2

The window in the accompanying figure displays each property's name in the right column and its value in the left column.
False
3
The macro recorder writes the most efficient code and records only those commands and actions you want in the finished project.
False
4
The VBA code "SUM(A1:A4)".Formula = Range("A5")changes the formula of cell A5 to sum up the values in the range A1:A4.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
5
A project cannot contain more than one module.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
6
Unlike Windows Explorer,Project Explorer does not allow you to view your project components hierarchically.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
7
The MsgBox function is similar to the InputBox function except that the MsgBox function does not contain a text box for the user to enter values.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
8
The And operator requires only one of two combined logical expressions to be true.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
9

In the window in the accompanying figure,to view the list of properties in alphabetical order and by category,you can click the tabs at the top of the window.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
10
Since Visual Basic for Applications is an application-specific language,Excel and Access use different variations of VBA.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
11
VBA allows you to create custom dialog boxes.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
12
All objects have properties.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
13
One important use of the Visual Basic Editor is to manage your projects.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
14
The VBA code Set WBook = Workbooks("Smith")stores the WBook variable in the Smith workbook.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
15
The VBA method ActiveWorkbook.SaveAs saves the current workbook.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
16
In VBA,a project consists of a single macro in one worksheet.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
17
You can quickly switch to the Visual Basic Editor by pressing the Shift+Alt keys.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
18
The Excel macro recorder is the fastest way to create macros.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
19
Macro buttons on the Quick Access Toolbar can be customized to display unique icons.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
20
To open the Visual Basic Editor you must first click the Macros button in the Code group on the Developer tab.
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
21
All procedures are considered public unless specified as Private._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
22
The Project Explorer window is dockable._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
23
Logical operators are used to combine expressions within a(n)condition._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
24
Attributes such as name,size,or color are known as properties._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
25
When the Visual Basic Editor opens,it usually displays three windows: the Project Explorer window,the Project window,and the Code window._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
26
In Excel,ChartObject refers to a chart embedded within a worksheet._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
27
Hold down the Ctrl Key and press the Home key to go to cell A1 in the worksheet._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
28
The Display property of the Worksheet object determines if a worksheet is hidden._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
29
To quickly switch to the Visual Basic Editor,press ____ on your keyboard.
A) Esc + F1
B) Ctrl + F7
C) Alt + F11
D) Enter + F12
A) Esc + F1
B) Ctrl + F7
C) Alt + F11
D) Enter + F12
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
30

The application shown in the accompanying figure is the Visual Basic ____.
A) Manager
B) Explorer
C) Writer
D) Editor
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
31

As you enter a command in the Project window shown in the accompanying figure,its effects are immediately applied to that workbook._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
32
To determine whether an expression used in a condition is true or false,the expression needs to contain a(n)condition operator._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
33
Property values containing text strings and numeric values do not need to be placed within quotation marks._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
34
VBA is a(n)object-linked programming language._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
35
In the function user = InputBox("Enter your username" ,"Log In"),"user" is the prompt._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
36
A project might contain several different modules._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
37
To go to cell A1 in a worksheet,hold down the ____ key and press the Home key.
A) Alt
B) Enter
C) Ctrl
D) Esc
A) Alt
B) Enter
C) Ctrl
D) Esc
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
38
Excel macros are written in the programming language ____.
A) Perl
B) JavaScript
C) HTML
D) VBA
A) Perl
B) JavaScript
C) HTML
D) VBA
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
39
To edit a VBA macro,you need to use the Visual Basic ____.
A) Manager
B) Explorer
C) Writer
D) Editor
A) Manager
B) Explorer
C) Writer
D) Editor
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
40
The VBA code Worksheets("Raw Data").Change = "Sample Data" changes the name of the "Raw Data" worksheet to "Sample Data"._________________________
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
41
A(n)____ is a collection of macros,worksheets,data entry forms,and other items that make up a customized application.
A) window
B) project
C) object
D) applet
A) window
B) project
C) object
D) applet
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
42
Within each project are various items called ____.
A) keys
B) variants
C) sources
D) objects
A) keys
B) variants
C) sources
D) objects
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
43
The item marked 1 in the accompanying figure is the ____.
A) Project Explorer
B) Code window
C) Properties window
D) VBA Manager
A) Project Explorer
B) Code window
C) Properties window
D) VBA Manager
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
44
When the Visual Basic Editor opens it usually displays ____ windows.
A) three
B) six
C) seven
D) eight
A) three
B) six
C) seven
D) eight
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
45
The following is a type of procedure supported by Visual Basic: ____.
A) function procedure
B) attribute procedure
C) formula procedure
D) settings procedure
A) function procedure
B) attribute procedure
C) formula procedure
D) settings procedure
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
46
The item marked 4 in the accompanying figure is the ____.
A) Project Explorer
B) Code window
C) Properties window
D) VBA Manager
A) Project Explorer
B) Code window
C) Properties window
D) VBA Manager
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
47
A(n)____ is any element within the Excel working environment,such as a worksheet,macro,or workbook.
A) source
B) component
C) object
D) window
A) source
B) component
C) object
D) window
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
48
The ____ is a Visual Basic Editor window.
A) Code Explorer
B) Properties window
C) Project window
D) Code Preview
A) Code Explorer
B) Properties window
C) Project window
D) Code Preview
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
49

To open the window in the accompanying figure,first click ____ on the menu bar.
A) Display
B) VBA
C) View
D) Code
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
50
Formatting a cell or displaying a chart are examples of ____ procedures in Visual Basic.
A) sub
B) function
C) property
D) attribute
A) sub
B) function
C) property
D) attribute
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
51
When you enter the name and description of a project,you are actually modifying two of its ____.
A) keys
B) properties
C) links
D) objects
A) keys
B) properties
C) links
D) objects
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
52
When you want to view the VBA macro code associated with any item in Project Explorer,you use the ____ window.
A) Macro
B) Module
C) Code
D) Project
A) Macro
B) Module
C) Code
D) Project
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
53
The Project ____ is a window in the Visual Basic Editor that displays a hierarchical list of all currently opened projects and their contents.
A) Manager
B) Browser
C) Explorer
D) Editor
A) Manager
B) Browser
C) Explorer
D) Editor
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
54
A ____ procedure returns a value.
A) sub
B) function
C) property
D) calculation
A) sub
B) function
C) property
D) calculation
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
55
Visual Basic supports ____ kinds of procedures.
A) two
B) three
C) six
D) eleven
A) two
B) three
C) six
D) eleven
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
56
All of the following are attributes of an object except ____.
A) name
B) size
C) location on the screen
D) name of creator
A) name
B) size
C) location on the screen
D) name of creator
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
57
The default project name given to new projects is ____.
A) VBObject
B) NewProject
C) Project
D) VBAProject
A) VBObject
B) NewProject
C) Project
D) VBAProject
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
58
To create sub procedures without using the macro recorder,you need to know some rules of VBA ____.
A) formulas
B) statistics
C) metrics
D) syntax
A) formulas
B) statistics
C) metrics
D) syntax
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
59
The item marked 3 in the accompanying figure is the ____ code.
A) Perl
B) VBA
C) Java
D) JavaScript
A) Perl
B) VBA
C) Java
D) JavaScript
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
60
A(n)____ is a collection of VBA macros.
A) aggregate
B) module
C) object
D) component
A) aggregate
B) module
C) object
D) component
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
61
To step through a sub procedure one line at a time,click in the sub procedure code and then repeatedly press the ____ key.
A) F7
B) F8
C) Alt
D) Shift
A) F7
B) F8
C) Alt
D) Shift
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
62
Procedure names cannot contain ____.
A) spaces
B) numbers
C) letters
D) any of the above
A) spaces
B) numbers
C) letters
D) any of the above
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
63
The Excel object you will use to create VBA programs and refer to a defined name in a workbook is ____.
A) Name
B) Range
C) Chart
D) Workname
A) Name
B) Range
C) Chart
D) Workname
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
64
The VBA code ____ refers to the collection of cells in the cell range,A1:B10.
A) Objects(A1:B10)
B) Names(A1:B10)
C) (A1:B10)
D) Range("A1:B10")
A) Objects(A1:B10)
B) Names(A1:B10)
C) (A1:B10)
D) Range("A1:B10")
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
65
To run an entire sub procedure,press the ____ key.
A) Alt
B) F5
C) F6
D) Shift
A) Alt
B) F5
C) F6
D) Shift
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
66
To dock and undock the window in the accompanying figure,right-click the window and then click the ____ on the shortcut menu.
A) Location
B) Stationary
C) Dockable
D) Movement
A) Location
B) Stationary
C) Dockable
D) Movement
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
67
The object name ____ refers to the worksheet currently being displayed in the workbook.
A) "DisplaySheet"
B) "ActiveSheet"
C) "ThisSheet"
D) "SheetDisplayed"
A) "DisplaySheet"
B) "ActiveSheet"
C) "ThisSheet"
D) "SheetDisplayed"
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
68
All of the following are properties of the Range object EXCEPT ____.
A) Address
B) Formula
C) Comment
D) Name
A) Address
B) Formula
C) Comment
D) Name
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
69

Click ____ on the menu bar and then click Immediate Window to open the window in the accompanying figure.
A) View
B) Code
C) Display
D) Options
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
70
The cell reference of a range is located in the ____ property of the Range object.
A) Where
B) CellRef
C) Reference
D) Address
A) Where
B) CellRef
C) Reference
D) Address
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
71
The Excel object you will use to create VBA programs and refer to a range in a worksheet is ____.
A) Cell
B) Range
C) Chart
D) Name
A) Cell
B) Range
C) Chart
D) Name
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
72
To open the Code window to the contents of a specific module,select the module in the Project Explorer window and then press the ____ key.
A) Esc
B) F7
C) F8
D) Shift
A) Esc
B) F7
C) F8
D) Shift
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
73
Procedure names can be up to ____ characters in length.
A) 125
B) 126
C) 255
D) 256
A) 125
B) 126
C) 255
D) 256
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
74
You can open the Immediate window in the accompanying figure by pressing the ____ keys in the Visual Basic Editor.
A) Ctrl+A
B) Ctrl+G
C) Shift+A
D) Alt+I
A) Ctrl+A
B) Ctrl+G
C) Shift+A
D) Alt+I
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
75
The Excel object you will use to create VBA programs and refer to a chart embedded within a worksheet is ____.
A) EmbedChart
B) ChartEmbed
C) ChartObject
D) Application
A) EmbedChart
B) ChartEmbed
C) ChartObject
D) Application
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
76
The object name ____ refers to the workbook containing the macro code that is currently running.
A) ThisCell
B) ThisWorkbook
C) ActiveWindow
D) ActiveWorkbook
A) ThisCell
B) ThisWorkbook
C) ActiveWindow
D) ActiveWorkbook
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
77
The ____ command is always the last line in a sub procedure and tells Excel to stop running the macro.
A) End
B) Quit Sub
C) End Sub
D) Stop Sub
A) End
B) Quit Sub
C) End Sub
D) Stop Sub
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
78
Comments are usually displayed by the editor in ____ font.
A) italicized
B) green
C) red
D) bold
A) italicized
B) green
C) red
D) bold
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
79
Comments must begin with a(n)____.
A) apostrophe
B) comma
C) period
D) double quotation mark
A) apostrophe
B) comma
C) period
D) double quotation mark
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck
80
The object name ____ refers to the cell from which a custom function is being run.
A) ThisWorkbook
B) ThisCell
C) ActiveCell
D) FunctionCell
A) ThisWorkbook
B) ThisCell
C) ActiveCell
D) FunctionCell
Unlock Deck
Unlock for access to all 150 flashcards in this deck.
Unlock Deck
k this deck