Redo method

Redo method

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.

See also         Example         Applies to

Reverses the most recent undo unit.

Version added

2.0

Syntax

        
          object
          .Redo
        
      

object

Required. An expression that returns an Application object.

Remarks

To reverse the effect of the Undo method, use the Redo method. For example, if you clear an item and restore it with the Undo method, use the Redo method to clear the item again.

You cannot invoke the Redo method from code that is executing inside the scope of an open undo unit. Code is in the scope of an open undo unit if it is one of the following:

  • A macro or add-on invoked by the Visio user interface.
  • In an event handler responding to a Visio event other than the VisioIsIdle event.
  • In a user-created undo scope. If you call the Redo method from code inside the scope of an open undo unit, it will raise an exception.

The Redo method also raises an exception if the Visio instance is presently performing an undo or redo. To determine whether the Visio instance is undoing or redoing use the IsUndoingOrRedoing property.

You can call the Redo method from the VisioIsIdle event handler because the VisioIsIdle event can only fire when the IsUndoingOrRedoing property is False. You can also call the Redo method from code not invoked by the Visio instance, for example, code invoked from the Visual Basic Editor or from an external program.