Class_Initialize

Occurs when an instance of the associated class is created.
Lets you control what happens when an instance is created
Occurs when the instance is first created
Lets you initialize property values
Lets you create references to other objects
This cannot take any parameters.
The statements part consists of zero or more code statements to be run when the class is initialized

Class MyClass 

   Private Sub Class_Initialize()
'statements
   End Sub

End Class

This event is fired when an instance of the class is created

Set objClass = New MyClass 


Creating

To add this event choose Class from the top left drop-down and then Initialize from the top right drop-down
SS




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