Grammer/Syntax Flashcards
What different types of values can the property of an object have?
Number: Range(“A4”).Value=4
Text: Range(“A4”).Value=”Rama”
Logical I.e., true or false: activecell.font.bold= True
How do you access the property of an object that is contained within other objects?
activesheet.shapes(2).line.weight
What is “method” in VBA?
It is a place holder for the action you want to perform on an object. For example, Range(“A4”).clearcontents
The line continuation character in VBA is
Underscore preceded by a space.
Code for row height
C.EntireRow.RowHeight
It’s not EntireRow.Height
Can properties in turn be objects in VBA?
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.
3 types of clear methods are ______
Range.ClearContents
Range.ClearFormats
Range.Clear ( clears both formats and contents).
How to save and close a workbook?
Workbooks(“book1.xlsm”).close SaveChanges:=True
Where can we use the line continuation charecter?
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
Where can we not use the line continuation charecter?
You cannot use the line continuation character between a colon and an equals sign