Undo Method

For the ChartSpace and Spreadsheet objects, undoes the last single action or the last macro block surrounded by BeginUndo and EndUndo method calls.

For the DataPage object, restores the data access page to the condition before the recordset was edited if the edits have not been saved.


*expression   * An expression that returns a ChartSpace, DataPage, or Spreadsheet object.


This example undoes the last action or displays a message box if this action cannot be undone.

If Spreadsheet1.CanUndo Then
    MsgBox "can't undo last action"
End If

Applies to | ChartSpace Object | DataPage Object | Spreadsheet Object

See Also | BeginUndo Method | DataPage Property | DSCEventInfo Object | EnableUndo Property | EndUndo Method | ReturnValue Property | Section Property