一段条件格式的代码出错"下标越界",请善知识指点。
时间:2011-08-05
来源:互联网
以下为一段录制的条件格式代码,为所选区域("R3:R9")加条件格式,
Range("R3:R9").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.FormatConditions(1) 运行到这里错误 下标越界
.MinPoint.Modify newtype:=xlConditionValueLowestValue
.MaxPoint.Modify newtype:=xlConditionValueHighestValue
End With
With Selection.FormatConditions(1).BarColor
.Color = 8700771
.TintAndShade = 0
End With
进行调试时,运行到这段With Selection.FormatConditions(1), 出现下标越界错误,问题是FormatConditions是EXCEL系统内部变量,怎么会出现下标越界呢? 请善知识指点,谢谢!
Range("R3:R9").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.FormatConditions(1) 运行到这里错误 下标越界
.MinPoint.Modify newtype:=xlConditionValueLowestValue
.MaxPoint.Modify newtype:=xlConditionValueHighestValue
End With
With Selection.FormatConditions(1).BarColor
.Color = 8700771
.TintAndShade = 0
End With
进行调试时,运行到这段With Selection.FormatConditions(1), 出现下标越界错误,问题是FormatConditions是EXCEL系统内部变量,怎么会出现下标越界呢? 请善知识指点,谢谢!
作者: 32283377 发布时间: 2011-08-05
1,你的版本不是2003的?
2,你用的是修改条件格式modify,而不是加add
请查阅帮助文件。
2,你用的是修改条件格式modify,而不是加add
请查阅帮助文件。
作者: 蓝桥玄霜 发布时间: 2011-08-05
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28