Application.OpenUndoTransaction Method

Project Developer Reference

Create an undo set for a series of operations.

Syntax

expression.OpenUndoTransaction(Label, guid)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Label Required String Name that appears in the drop-down list for the Undo Transaction command.
guid Optional Variant GUID that uniquely identifies Label.

Remarks

The OpenUndoTransaction method is used in conjunction with CloseUndoTransaction method.

See "Creating an Undo Transaction Set" in Multiple Undo/Redo Actions.

Example

The following sample demostrates using the OpenUndoTransaction method in conjunction with the CloseUndoTransaction method.

Visual Basic for Applications
  Sub SampleUndo()
    OpenUndoTransaction ("Adding Task")
        
        Application.ActiveProject.Tasks.Add ("Task 1")
    
    CloseUndoTransaction
EndSub()

See Also