excel色彩点阵渐显.vbs- set xls=createobject("excel.application")
- xls.visible = true
- call xls.workbooks.add
-
- Set objRange = xls.Range("A1","bz30")
- objrange.columns = " " '范围内字符全为空
- objrange.columnwidth = 1 '设置单元格横向长度
- objrange.rowheight = 16 '设置行高度
-
- objRange.Interior.ColorIndex = 1 '范围内的背景颜色
-
- dim yx(399)
- maxyx=400-1
- for i=0 to maxyx
- yx(i)=i
- next
-
- randomize
-
- for i= maxyx to 0 step -1
- randx=int(i*rnd)
- color=(i)mod(40)+3
- xynow=yx(randx)
- y=xynow\20+1
- x=(xynow)mod(20) + 1
- xls.cells(x,y).interior.colorindex = color
- yx(randx)=yx(i)
- if color > 20 then wscript.sleep 10
- next
复制代码
|