Excel VBA has the Application.OnUndo
function to handle this:
Public Sub DoSomething
... do stuff here
Application.OnUndo "Undo something", "UnDoSomething"
End Sub
Public Sub UnDoSomething
... reverse the action here
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…