Excel VBA 循环“我中毒了~”

    DimRuntimeAsDateSubRunTimer()Runtime=Now()+TimeValue("00:00:01")Application.OnTimeRuntime,"my_Procedure"EndSubSubmy_Procedure()StaticcountAsIntegercount=count+1Fori=1To10Forj=1To20Cells(i+(count-1)*10,j)="我中毒了~~~~"Cells(i+(count-1)*10,j).Font.Color=vbRedCells(i+(count-1)*10,j).Font.Size=10NextNextIfcount=10ThenExitSubEndIfRunTimerEndSub

就是一个在单元格中的循环,按时间来循环,每过1秒钟进行一个循环~

为了不让其无限循环下去,设置了循环10次即退出~

650) this.width=650;” border=”0″ alt=”” src=”http://cdn.verydemo.com/upload/2013_04_05/13651400979330.jpg” />

吃饭倒计时:

    DimRuntimeAsDateSubRunTimer()Runtime=Now()+TimeValue("00:00:01")Application.OnTimeRuntime,"my_Procedure"EndSubSubmy_Procedure()Cells(1,2)=Format(Now(),"h:mm:ss")Cells(2,2)="18:00:00"Cells(3,2)=Format(Cells(2,2)-Cells(1,2),"h:mm:ss")Cells(4,2)=Format(TimeValue("18:00:00")-TimeValue(Now()),"h:mm:ss")RunTimerEndSub

因为在路上你就已经收获了自由自在的好心情。

Excel VBA 循环“我中毒了~”

相关文章:

你感兴趣的文章:

标签云: