ReadProperties Event

       

Occurs when loading an old instance of an object that has a saved state.

Syntax

Sub object_ReadProperties(pb As PropertyBag)

The ReadProperties event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
pb An object of the type PropertyBag class that contains the saved data to load.

Remarks

When this event occurs, the object author can load in the saved state from pb, by calling the ReadProperty method of the PropertyBag object for each value that is to be loaded. This event occurs after the Initialize event.

Always include error trapping when handling the ReadProperties event, to protect the control from invalid property values that may have been entered by users editing the file containing the saved data with text editors. However, you should not raise an error in an event, since doing so may be fatal to the container, so any error trapping in the ReadProperties event procedure should not include raising errors.