Reference Types

A reference type is also known as an Object data type.
When you want to assign something to a reference type you must use the Set statement.

CollectionA collection is a special type of object that represents a group of objects.
ClassA Class module is a special type of module that lets you create your own customised objects.
ObjectThe object data type contains a reference (or an address) to an actual object.

Collections

Dim colEmployees As Collection 
Set colEmployees = New Collection

Classes

Dim oEmployee As class_Employee 
Set oEmployee = New class_Employee

Objects

Dim oMyObject As Object 
Set oMyObject = New Library.ClassName ' uses early binding
Set oMyObject = CreateObject("Library.ClassName") ' uses late binding

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext