Share via


EndEdit Event

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Occurs whenever the user switches from edit mode on the specified Spreadsheet Control or PivotTable list. You can use this event to validate data entry in a worksheet or in the detail area of a PivotTable list.

Private Sub Object_EndEdit(ByValAcceptAsBoolean, ByValFinalValueAsByRef, ByValCancelAsByRef, ByValErrorDescriptionAsByRef)

*Object * A PivotTable or Spreadsheet object.

Accept  Specifies whether or not the specified control is accepting the edit. If this argument is False, then the control is leaving edit mode because the user cancelled the edit. If this argument is True, then you can cancel the edit.

FinalValue  The Value property of this argument returns the value that is to be entered into the worksheet or PivotTable list.

*Cancel * Set the Value property of this argument to True to cancel the edit and leave the user in edit mode.

ErrorDescription Set the Value property of this argument to the text that you want to display to the user. The default text is "The new value was not accepted.".