Share via


UndoLevels Property [Visio 2003 SDK Documentation]

Determines the number of consecutive actions the user can undo in Microsoft Office Visio.

longRet = object.UndoLevels

object.UndoLevels = longVal

longRet    Long. Current number of undo levels.

object    Required. An expression that returns an ApplicationSettings object.

longVal   Required Long. New number of undo levels.

Version added

2003

Remarks

Setting the UndoLevels property is equivalent to setting the Undo levels option on the General tab in the Options dialog box (Tools menu).

The minimum possible value for UndoLevels is 0 (zero); the maximum is 99. The default value is 20.

The higher the value of UndoLevels, the more memory is required to store the actions.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the UndoLevels property to print the current number of undo levels in the Immediate window. It also shows how to get an ApplicationSettings object from the Visio Application object.

Public Sub UndoLevels_Example()

    Dim vsoApplicationSettings As Visio.ApplicationSettings
    Dim lngUndoLevels As Long

    Set vsoApplicationSettings = Visio.Application.Settings
    lngUndoLevels = vsoApplicationSettings.UndoLevels

    Debug.Print lngUndoLevels

End Sub

Applies to | ApplicationSettings object

See Also | Application object | Settings property