Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|

VBA

|SharePoint|Consultancy|Newsletter|Contact 
 VBA > Class Modules > Properties - Set< Previous | Next > 

 

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.

 

 
1
2
3
4
5
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

 






 Copyright © 2011 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >