Fired before a cell's contents is updated.
|Cell||Cell whose text is about to be updated|
|Text||Updated contents of the cell|
|Validation||The cell's validation pattern|
|Message||The cell's validation message|
|OldText||The cell's text before it went into edit mode|
The BeforeUpdate event is fired when the user leaves a cell while in edit mode but before the changes to the cell's text has been applied. To prevent the cell's contents from being updated, set the Cancel property to 1. If the CellProtection property for the cell is anything other than "None," then this event never fires since the user can never edit the cell's contents.
The Cell parameter indicates the cell whose text is about to be updated, and the Text property contains the new contents of the cell. The Validation and Message parameters can be set using CellConv. This is useful when you want to do your own validation rather than letting the control do it for you. The OldText parameter is the text that was in the cell before the user edited it.
Using the Cancel property to cancel the event only works if the event was qualified synchronously.