Updated Event

       

Occurs when an object's data has been modified.

Syntax

Sub object_Updated (code As Integer)

The Updated event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
code An integer that specifies how the object was updated, as described in Settings.

Settings

The settings for code are:

Constant Value Description
vbOLEChanged 0 The object's data has changed.
vbOLESaved 1 The object's data has been saved by the application that created the object.
vbOLEClosed 2 The file containing the linked object's data has been closed by the application that created the object.
vbOLERenamed 3 The file containing the linked object's data has been renamed by the application that created the object.

Remarks

These constants are listed in the Visual Basic (VB) object library in the Object Browser. You can use this event to determine if an object's data has been changed since it was last saved. To do this, set a global variable in the Updated event indicating that the object needs to be saved. After you save the object, reset the variable.