EndEdit Event

Microsoft Office Web Components Object Model

EndEdit Event

       

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(ByVal Accept As Boolean, ByVal FinalValue As ByRef, ByVal Cancel As ByRef, ByVal ErrorDescription As ByRef)

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.".