选择如何检测单元格以进行编辑 [英] How to detect a cell is selected for editing in excel

查看:107
本文介绍了选择如何检测单元格以进行编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一系列只读单元格。之后所有其他单元格是可编辑的。我想知道如何检测这个单元格编辑事件。如果单元格A25被编辑,我想调用一个程序。
如果单元格(A25).edited然后执行此操作。一些这样的事情

解决方案

您需要使用 Worksheet_SelectionChange 事件在我的其他问题之一中突出显示。



我可以建议现在是一个很好的时间去学习更多关于Excel事件,以及可以和不能做的事情,而不是询问多个类似的问题?



以下链接可能有助于:



http://www.cpearson.com/excel/events.htm



http://www.mvps.org/dmcritchie/excel/event.htm



http:// www。 ozgrid.com/VBA/ExcelWorkbookEvents.htm


I have a range of readonly cells.After that all other cells are editable.I want to know how can I detect this cell editing event.Like if cell A25 is edited,I want to call a procedure. If Cell(A25).edited then do this.Some thing like this

解决方案

You need to use the Worksheet_SelectionChange event as highlighted in my answer to one of your other questions.

May I suggest that now would be a good time to go and learn a bit more about Excel events and what you can and can't do with them, rather than asking multiple similar questions?

The following links may help:

http://www.cpearson.com/excel/events.htm

http://www.mvps.org/dmcritchie/excel/event.htm

http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm

这篇关于选择如何检测单元格以进行编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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