Fired when the data does not match the cell's validation pattern.

Parameters

ParameterDescription
CellThe cell whose data is invalid
DataThe invalid data
PatternThe cell's validation pattern
MessageThe cell's validation message

Remarks

The OnInvalidData event fires when the user attempts to update a cell containing invalid data by navigating to another cell or leaving the table altogether. Data is considered invalid when the data in the cell does not match the validation pattern specified for that cell.

This event does not fire if 1) the cell has no validation pattern or 2) the developer specified that a validation message appear automatically.

Whenever the event does not fire, then the process continues to the BeforeUpdate event. If the event does fire, however, processing will only continue to the BeforeUpdate event if the Cancel property is 0. Set the Cancel property to 1 or 2 during this event if you want to halt the update event chain completely.

The parameters are all provided for convenience. In particular, you may find the Message parameter useful if you want to manually display your own popups while conveniently storing cell-specific messages in the table itself (to avoid the use of case statements, for example).

See Also

BeforeUpdateCellConv

  • No labels