Property Set

Used to assign (or change) an object assigned to a property.
Creates a reference to an object
This can be used to set a property to an object.
You can't define a property set inside another function or subroutine.


Private field_oEmployee As Object 

Public Property Set Property_InitialiseObject(oObject As Object)
   Set field_oEmployee = oObject
End Property

You can only use a Property Set procedure on the left side of an object reference

objEmployee.Property_InitialiseObject = oEmployee


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