更新时间:2023-11-30 14:38:52
将命令按钮添加到工作表并为其分配以下宏:
Add the command button to the worksheet and assign the following macro to it:
Sub UndoLastAction()
With Application
.EnableEvents = False
.Undo
.EnableEvents = True
End With
End Sub
它只能撤消用户执行的最后一项操作,而不能撤消VBA命令.
It can only undo the last action taken by the user and cannot undo VBA commands.
如果需要进一步的撤消功能,请参见:
If you need further undo capabilities see: