"撤消"历史按钮清除后运行宏excel [英] "Undo" history button clear after run macro excel

查看:158
本文介绍了"撤消"历史按钮清除后运行宏excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Worksheet_SelectionChange事件触发的宏。宏验证一列的数据,如果错误,它会更改单元格的背景颜色。

I have a macro that fires on the "Worksheet_SelectionChange" event. The macro validate data of one column, it changes the background color of the cell if its wrong.

问题是在运行宏后,它会清除更改的历史记录(所有文件的Ctrl Z),甚至我没有验证的其他单元格的历史记录更改。

The problem is after run the macro, it clears the history of changes (Ctrl Z) of all the document, even the history changes of other cells that I didnt validate.

我如何解决这个问题?

谢谢。

推荐答案

正如其他人所说,没有办法停止工作表清除撤消堆栈的宏。

As the others have stated, there is not way to stop a worksheet-changing macro from clearing the undo stack.

另一个副作用是,您无法撤消宏,无需编写自己的撤消例程,这可能是一个巨大的麻烦。

As another side-effect, you can't undo the macro either without writing your own Undo routine, which can be a huge hassle.

以下是希望MS将来更改此内容。

Here's to hoping MS changes this in the future.

这篇关于"撤消"历史按钮清除后运行宏excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆