Applies To
Frame control, Page object, UserForm object.
Description
Reverses the most recent action that supports the Undo command.
Syntax
Boolean = object.UndoAction
The UndoAction method syntax has these parts:
Part
Description
object
Required. A valid object.
Remarks
The Undo command in the user interface uses the UndoAction method. For example, if you paste text into a TextBox, you can use UndoAction to remove that text and restore the previous contents of the TextBox.
Not all user actions can be undone. If an action cannot be undone, the Undo command is unavailable following the action.
NoteIf the CanUndo property is False, the Undo command is not available in the user interface, and UndoAction is not valid in code.
If UndoAction is applied to a form, all changes to the current record are lost. If UndoAction is applied to a control, only the control itself is affected.
You must apply this method before the form or control is updated. You may want to include this method in a form's BeforeUpdate event or a control's Change event.
UndoAction is an alternative to using the SendKeys statement to send the value of ESC in an event procedure.
See Also
BeforeUpdate event, CanRedo property, CanUndo property, Change event, RedoAction method, TextBox control.
Example
See the CanRedo property example.
Remarks
The value of the Zoom property specifies a percentage of image enlargement or reduction by which an image display should change. Values from 10 to 400 are valid. The value specified is a percentage of the object's original size; thus, a setting of 400 means you want to enlarge the image to four times its original size (or 400 percent), while a setting of 10 means you want to reduce the image to one-tenth of its original size (or 10 percent).
Example
See the Frame control example.