[转]Worksheet.Change Event (Excel)
本文转自:https://msdn.microsoft.com/en-us/library/office/ff839775.aspx#AboutContributor
Example
The following code example changes the color of changed cells to blue.
Sample code provided by: Bill Jelen, MrExcel.com | About the Contributors
The following code example verifies that, when a cell value changes, the changed cell is in column A, and if the changed value of the cell is greater than 100. If the value is greater than 100, the adjacent cell in column B is changed to the color red.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Then
ThisRow = Target.Row
If Target.Value > 100 Then
Range("B" & ThisRow).Interior.ColorIndex = 3
Else
Range("B" & ThisRow).Interior.ColorIndex = xlColorIndexNone
End If
End If
End Sub
Sample code provided by: Tom Urtis, Atlas Programming Management | About the Contributors
The following code example sets the values in the range A1:A10 to be uppercase as the data is entered into the cell.
[转]Worksheet.Change Event (Excel)的更多相关文章
- there is issue about change event of checkbox in the ie8 oe ie7
some people said the change event of checkbox can not trigger in the ie7 or ie8,that's not true. thi ...
- JPA project Change Event Handler问题解决[转]
转至:http://my.oschina.net/cimu/blog/278724 这是Eclipse中的一个GUG: Bug 386171 - JPA Java Change Event Handl ...
- 【转】JPA project Change Event Handler / 导致eclipse十分卡
这是Eclipse中的一个GUG: Bug 386171 - JPA Java Change Event Handler (Waiting) 解决方法: 1.) 退出Myeclipse(或eclips ...
- JPA project Change Event Handler问题解决
eclipse使用的是有经常会出现JPA project Change Event Handler(watering)很卡 网上的解决办法是 [Help > Installation Detai ...
- js & input event & input change event
js & input event & input change event vue & search & input change <input @click=& ...
- VSTO:使用C#开发Excel、Word【12】
Excel对象模型中的事件了解excel对象模型中的事件至关重要,因为这通常是代码运行的主要方式.本章将检查Excel对象模型中的所有事件,引发事件以及可能与这些事件关联的代码类型. Excel对象模 ...
- C# worksheet设置Excel样式
1.例子导出Excel的样式 样式代码 public void Exportdatagridviewtoexcel(string Textname) { SaveFileDialog savedial ...
- C# worksheet设置Excel样式(转载)
1.例子导出Excel的样式public void Exportdatagridviewtoexcel(string Textname) { SaveFileDialog savedialog = n ...
- 如何使用 Visual C# .NET 处理 Excel 事件
事件处理概述 Visual C# .NET 使用委派处理来自组件对象模型 (COM) 服务器的事件.委派是 Microsoft Visual Studio .NET 中的一个新概念.对于 COM 事件 ...
随机推荐
- Python 3.X 实现定时器 Timer,制作抽象的Timer定时器基类
Python 在不依赖第三方库的前提下,对于定时器的实现并不是很完美,但是这不意味着我们无法实现. 阅读了网上的一些资料,得出一些结论,顺手写了一个基类的定时器(Python3) BaseTimer: ...
- Bootstrap 框架 栅格布局系统设计原理
如果你是初次接触Bootstrap,你一定会为它的栅格布局感到敬佩.事实上,这个布局系统提供了一套响应式的布局解决方案. 既然这么好用,那他是如何用CSS来实现的呢? 我特意去Bootstrap官方下 ...
- How Tomcat Works读书笔记之升级架构
上一篇HttpServer类职责很多,包括启动服务器,创建ServerSocket,得到客户端Socket,创建Request对象和Response对象,并解析Http请求,这样很混乱,不利于以后服务 ...
- javascript实现排序算法
准备好好学习js了,js写的第一个排序 先推荐一个js在线编辑工具,RunJS,还不错. 冒泡排序 var arr = [2,4,1,5,3]; function handle(arr){ for(v ...
- Genymotion Shell命令
命令行选项 •-h 输出帮助信息 •-r ip_address 连接到特定Genymotion虚拟设备 •-c "command" 在原生shell环境中执行给定命令而后返回 •- ...
- Python生成器、迭代器、可迭代对象
把一个列表[]改成()就创建了一个生成器:generator,generator保存的是算法. 可以用于for循环的数据类型:1.集合类型:list tuple dict set str2.gener ...
- Linux学习笔记(整理记录)
1.安装 (1):安装网址:http://www.jb51.net/os/78318.html 2.鸟哥的Linux命令学习 (1):显示系统目前所支持的语言:echo $LANG (2):修改语言成 ...
- 基于MATLAB实现的云模型计算隶属度
”云”或者’云滴‘是云模型的基本单元,所谓云是指在其论域上的一个分布,可以用联合概率的形式(x, u)来表示 云模型用三个数据来表示其特征 期望:云滴在论域空间分布的期望,一般用符号Εx表示. 熵:不 ...
- Java中的继承与组合(转载)
本文主要说明Java中继承与组合的概念,以及它们之间的联系与区别.首先文章会给出一小段代码示例,用于展示到底什么是继承.然后演示如何通过“组合”来改进这种继承的设计机制.最后总结这两者的应用场景,即到 ...
- 转:NLog 自定义日志内容,写日志到数据库;修改Nlog.config不起作用的原因
转:http://www.cnblogs.com/tider1999/p/4308440.html NLog的安装请百度,我安装的是3.2.NLog可以向文件,数据库,邮件等写日志,想了解请百度,这里 ...