EnableUndo Property Example

This example creates an undo block containing code that sets the number format and font for the active cell.

Spreadsheet1.EnableUndo = True
Spreadsheet1.BeginUndo
    Set ac = Spreadsheet1.ActiveCell
    ac.NumberFormat = "0.###"
    ac.Font.Color = "blue"
    ac.Font.Name = "times new roman"
Spreadsheet1.EndUndo