[转]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 事件 ...
随机推荐
- c#调用Aspose.Word组件操作word 插入文字/图片/表格 书签替换套打
由于NPOI暂时没找到书签内容替换功能,所以换用Apose.Word组件. using System; using System.Collections.Generic; using System.C ...
- BI之SSAS完整实战教程7 -- 设计维度、细化维度中 :浏览维度,细化维度
上篇文章我们已经将Dim Geography维度设计好. 若要查看维度的成员, AS需要接收该维度的详细信息(包括已创建的特性.成员属性以及多级层次结构), 通过XMLA与AS的实例进行通信. 今天我 ...
- 重新想象 Windows 8 Store Apps (65) - 后台任务: 音乐的后台播放和控制
[源码下载] 重新想象 Windows 8 Store Apps (65) - 后台任务: 音乐的后台播放和控制 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 后台 ...
- JMS学习(四) Selector详解
一.前言 在掌握了消息的结构之后,我们接下来看一下JMS的一个重要功能:选择器.有些时候,作为消费者只希望处理自己感兴趣的消息.如果某个消息只有一个消费者,我们可以在让该客户端根据规则来处理自己感兴趣 ...
- 配置ssh免密码连接
建立ssh连接步骤: 1,在主机安装ssh-server,执行指令: apt-get install openssh-server 2,在主机上执行指令: netstat -atpn | grep 可 ...
- UltraEdit打开UTF-8文件后显示中文乱码的问题
左图是UE,默认的编码格式GBK.右图可以看出可修改成UTF-8编码.按钮位置是UE底部状态栏,图3显示怎么开关状态栏. >>>>>>>>>> ...
- mysql服务器的字符集
文章:http://www.cnblogs.com/fantiantian/p/3468454.html 的评论中有这样的文字: 谢谢沧海一滴的总结 在Linux中一般都是UTF-8字符集.我们在建数 ...
- ASP.NET MVC自定义AuthorizeAttribute篇知识点讲解—登录限制
1.前言 a.微软对ASP.NET的开发从WebForm到MVC的转变,已经正式过去5,6个年头,现在WebForm和MVC也都越来越完善,小小算来我也已经工作了将近三年,从大学的时候学习ASP.NE ...
- javascript中||和&&代替if
首先,我们来看一段代码: ; ){ add_level = ; } ){ add_level = ; } ){ add_level = ; } ){ add_level = ; } else { ad ...
- JavaScript基础13——js的string对象
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...