Accessing the Properties of an Object

To assign a value to a property of an object, put the object variable and property name on the left side of an assignment, and the desired property setting on the right side. For example:

Dim ObjVar As IMyInterface
Dim RowPos, ColPos
Set ObjVar = New MyObject

ObjVar.Text = "Hello, world"
ObjVar.Cell(RowPos, ColPos) = "This property accepts two arguments."
' Sets the font for ObjVar.Selection.
ObjVar.Selection.Font = 12 

Property values can also be retrieved from an object:

Dim X As Object

X = ObjVar.Text
X = ObjVar.Range(12, 32)