To create an event procedure that is run when the Updated event occurs, set the OnUpdated property to [Event Procedure], and click the Build button.
To see if an object�s data has been changed since it was last saved, set a global variable in the Updated event procedure indicating that the object needs to be saved. When you save the OLE object, reset the variable.
Private Sub controlname_Updated (Code As Integer)
The Updated event procedure uses the following argument.
Argument |
Description |
controlname |
A string that is the name of the control affected by the Updated event procedure. |
Code |
An intrinsic constant that indicates how the OLE object was updated. The Code argument can have the following constants: |
Argument acOLEChanged |
Description Indicates that the object�s data has changed. |
acOLESaved |
Indicates that the object�s data has been saved by the application that created the object. This usually occurs when the user chooses the application�s Update command or whatever command is used for updating. |
acOLEClosed |
Indicates that the file containing the object�s data has been closed by the application that created the object. |
acOLERenamed |
Indicates that the file containing the object�s data has been renamed by the application that created the object. |
Updated Event � Macros.