Chapter 7 Flashcards Preview

Excel VBA COPY > Chapter 7 > Flashcards

Flashcards in Chapter 7 Deck (13)
Loading flashcards...
1

When are apostrophes ignored as comment indicators in Excel VBA?

When they are contained within a set of quotation marks

(e.g. Msg = "Can't continue")

2

Quick way to convert a block of statements into comments

From the VBE:

View->Toolbars->Edit

Select group of statements and click the Comment Block button

3

The first character of a variable must be a _____.

letter

4

Does VBA distinguish between uppercase and lowercase letters in variables?

No

5

Cannot use these characters in a variable name

spaces

periods

math operators

#, $, %, &, !

6

Letting VBA handle your data typing results in these two issues

slower execution

inefficient memory use

7

To get a slight performance increase use this instead of Integer for variable type

Long

8

What is the default data type?

Variant

9

What is the data type Variant?

changes type depending on what you do with it

10

Use this statement as the first statement in code to force declaration of all variables

Option Explicit

11

One benefit of using Option Explicit as first line

mis-spelled variables will be identified as not being typed

12

Press this after typing the first two or three characters of a variable or reserved word or function to get selection list or auto-completion

Ctrl+space bar

13

Example of dimensioning a variable

Dim YourName as String

Dim January_Inventory as Double

Dim RowNumber as Long

Dim X

(X is treated as a Variant)