# Undo/Redo

Describes how undo and redo works in Spread for WPF, including the different actions and properties available.

## Content

The Undo/Redo feature provides flexibility to modify recent changes, helping you quickly correct mistakes or revisit previous data entries. You can undo and redo various actions using Ctrl+Z and Ctrl+Y keys.
By default, you can undo or redo up to the last 100 consecutive actions. However, you can customize the number of undo and redo actions by using the [Limit](/spreadnet/api/latest/online-wpf/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Commands.CommandManager.Limit.html) property of the **CommandManager** class. You can also disable undo and redo operations by setting the Limit property to 0.

> !type=note
> **Note**: Certain actions, such as selecting cells, scrolling, and calling spreadsheet functions, cannot be undone or redone.

The below example code disables the undo and redo ability in a workbook.
**C#**

```csharp
// Disable undo/redo operations.
spreadSheet1.Workbook.WorkbookSet.CommandManager.Limit = 0;
```

**VB**

```auto
' Disable undo/redo operations.
spreadSheet1.Workbook.WorkbookSet.CommandManager.Limit = 0
```