Grammer/Syntax Flashcards

0
Q

What different types of values can the property of an object have?

A

Number: Range(“A4”).Value=4

Text: Range(“A4”).Value=”Rama”

Logical I.e., true or false: activecell.font.bold= True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

How do you access the property of an object that is contained within other objects?

A

activesheet.shapes(2).line.weight

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is “method” in VBA?

A

It is a place holder for the action you want to perform on an object. For example, Range(“A4”).clearcontents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The line continuation character in VBA is

A

Underscore preceded by a space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Code for row height

A

C.EntireRow.RowHeight

It’s not EntireRow.Height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can properties in turn be objects in VBA?

A

Let’s consider the Range object. You can change the appearance of the selected range of cells by setting the Font property. But the font can have a different name (Times New Roman, Arial,. ), different size (10, 12, 14,. ), and different style (bold, italic, underline,. ). These are font properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

3 types of clear methods are ______

A

Range.ClearContents
Range.ClearFormats
Range.Clear ( clears both formats and contents).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to save and close a workbook?

A

Workbooks(“book1.xlsm”).close SaveChanges:=True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where can we use the line continuation charecter?

A

You can use the line continuation character in your code before or after:
Operators, for example: &, +, Like, NOT, AND
A comma
A colon and an equals sign (:=)
An equals sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where can we not use the line continuation charecter?

A

You cannot use the line continuation character between a colon and an equals sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly