这样的代码如何写得更简洁些
.Columns(1).Cells.Replace("A","甲").Columns(1).Cells.Replace("B","乙")
.Columns(1).Cells.Replace("C","丙")
.Columns(1).Cells.Replace("D","丁")
.Columns(1).Cells.Replace("E","戊")
.Columns(1).Cells.Replace("F","己")
.Columns(1).Cells.Replace("G","庚")数组? 这个码不懂
看后面的应该可以用FOR Local $a = [["A","B","C","D","E","F","G"],["甲","乙","丙","丁","戊","己","庚"]]
For $i = 0 To 6
.Columns(1).Cells.Replace($a[$i],$a[$i])
Next
这个怎么样 学习了,谢谢... 回复 3# 1007236046
这样更简洁!
Local $a = ["甲","乙","丙","丁","戊","己","庚"]
For $i = 0 To 6
.Columns(1).Cells.Replace(Chr($i+65), $a[$i])
Next 回复1007236046
这样更简洁!
user3000 发表于 2012-5-22 09:41 http://www.autoitx.com/images/common/back.gif
这个更简洁,学习了! 回复 5# user3000
学习了,果然更简洁! 谢谢楼上各位! 回复 5# user3000
因为刚好是abcd。。。所以可行,不错。
页:
[1]