Verified Answers| Actual Complete Exam| Already
Graded A+
Which of the following variable types are Excel objects? Select all that apply.
Range
Double
String
Worksheet ✔Correct Answer-Range
Worksheet
T/F A macro declared as:
Private Sub TestMacro()
Is stored in the Sheet1 part of the VBA project.
This macro is available (can be called or accessed) from the Modules part of the VBA project.
✔Correct Answer-False
The variable Msg is dimmed as a String variable.
Consider the following line of code:
ActiveSheet.Range("A1").Value = Msg
What is happening here?
The value of variable Msg is being assigned to cell A1
OR
The value of cell A1 is being assigned to the variable Msg ✔Correct Answer-The value of variable
Msg is being assigned to cell A1
What is a variable ✔Correct Answer-It is a symbolic name for a storage location, without variables
you cannot process data
2 Steps to declaring a variable ✔Correct Answer-1. Declare the variable - Dim variable name and
data type
2. Define a variable - set a value to variable
Assigning values to variables ✔Correct Answer-Box.Value = Right
The thing on the right hand side is assigned to the thing on the left hand side
Scope ✔Correct Answer-Public: can be ran from anywhere in the project
Private: can only be run inside of the workbook
Object Model ✔Correct Answer-1. Objects
2. Properties
3. Methods
4. Events
5. Collections
The object model is hyiracial, the periods indicate different levels of the hierarchy
T/FConsider this code:
, With PiRange
.Value = Pi
End With
In this particular case, the With block doesn't add much value as this could be expressed as a single
line such as:
PiRange.Value = Pi ✔Correct Answer-True
Boolean ✔Correct Answer-Dim - as Booleen
Value Type - true/false
Example - Dim Flag as Boolean
Flag = Flase
Date/Time ✔Correct Answer-Dim - as date
Value Type - a date
Example - needs to be between # signs #31/12/1999#
All excel objects need... ✔Correct Answer-Set prior to assigning it a value
What is an object? ✔Correct Answer-Something that is Excel dependent (does not exist outside of
Excel, ex: workbook, range, worksheet)
Integer ✔Correct Answer-Value Type - Whole numbers (<10,000) positive, negative, or zero
Long ✔Correct Answer-Value Type - Whole Numbers (<10,000) positive, negative, or zero. Can
store very long numbers *(same thing as integer, USE LONG)
Double ✔Correct Answer-Value Type - Decimals
String ✔Correct Answer-Value Type - Accepts strings of text, usually identified with double
quotation mark
Variant ✔Correct Answer-Value Type - Data Type that can hold anything (numbers, text, charts,
arrays, shapes)
Which of the following variable data types are meant to store only whole numbers? Select all that
apply.
Decimal
Integer
Long
Double ✔Correct Answer-Integer, Long
Recording macros by itself does not allow you to do which of the following? Select all that apply.
Use variables
Get object model specifications for things like formatting
Use loops
Use conditionals ✔Correct Answer-Use variables
Use loops
Use conditionals
To record macros, you use which of the following Excel ribbons?
Formulas