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 mobjEmployee As Object 

Public Property Set InitialiseObject(myObject As Object)
   Set mobjEmployee = myObject
End Property


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

objEmployee.InitialiseObject = objEmployee




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