mas_oz2k1
mas_oz2k1

Reputation: 2901

Is it possible to do Undo/Redo in Excel using C#?

My VSTO application is a C# Add-In. I would like to add some undo(Ctrl +z) and redo functionality(Ctrl +Y).

Upvotes: 4

Views: 2562

Answers (2)

code4life
code4life

Reputation: 15794

Is this what you're looking for?

Globals.ThisAddIn.Application.Undo()

Globals.ThisAddIn.Application.Repeat()

Upvotes: 1

Michael Regan
Michael Regan

Reputation: 1598

I've used a hidden document in conjunction with Range.WordOpenXML/.InsertXML with good success in Word. I can't say how well it would work with Excel. Here is my previous answer with some code samples.

Upvotes: 0

Related Questions