|
代码***********************
Sub wangyxiaog()
Dim hlTime As Long
For i = 1 To Range("a65536").End(xlUp).Row
For J = 1 To Len(Range("A" & i)) Step 1
Cells(i, 1).Characters(Start:=1, Length:=J).Font.ColorIndex = 6
hlTime = Timer + 0.481111
Do
DoEvents
Loop Until Timer > hlTime
Next
Next
Call 结束
End Sub
**********************************************************
Sub 结束()
Range("A:A").Select
Selection.Interior.ColorIndex = 1
Selection.Font.ColorIndex = 1
Range("iv11").Select
End Sub
*************************************************
效果更显著的代码方法2:
Sub wangyxiaog2()
Dim hlTime As Long
For i = 1 To Range("a65536").End(xlUp).Row
For J = 1 To Len(Range("A" & i)) Step 1
Cells(i, 1).Characters(Start:=1, Length:=J).Font.ColorIndex = 6
PauseTime = 0.05 '设置暂停时间为0.5秒。
Start = Timer ' 设置开始暂停的时刻。
Do While Timer < Start + PauseTime
DoEvents
Loop
Next
Next
Call 结束
End Sub
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-2-21 19:00 , Processed in 0.059706 second(s), 15 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.