Visual Basic Reference

InitProperties Event

See Also    Example    Applies To

Occurs when a new instance of an object is created.

Syntax

Subobject_InitProperties()

The InitProperties event syntax has this part:

Part Description
object An object expression that evaluates to an object in the Applies To list.

Remarks

This event allows the author of the object to initialize a new instance of the object. This event occurs only when a new instance of an object is being created; this is to allow the author of the object to distinguish between creating a new instance of the object and loading an old instance of the object.

By putting in code to initialize new instances in the InitProperties event rather than the Initialize event, the author can avoid cases where loading data through a ReadProperties event into an old instance of the object will undo the initialization of the object.