Export (0) Print
Expand All

CanUndo Property

Office 2003

True if there is a previous action that can be undone. Read-only Boolean.

expression.CanUndo

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

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

Sub Undo_Action()
    If Spreadsheet1.CanUndo Then
        Spreadsheet1.Undo
    Else
        MsgBox "Can't undo last action."
    End If
End Sub

		


See Also | Undo Method


Show:
© 2014 Microsoft