在倒计时状态栏在Excel中使用VBA
如果您想知道如何在excel中创建计时器,请问:
从30秒到0秒的倒计时将显示在状态栏中。
答案:
在标准模块中插入以下代码。
Sub CountDown() Dim intCounter As Integer Dim bln As Boolean bln = Application.DisplayStatusBar Application.DisplayStatusBar = True For intCounter = 30 To 1 Step -1 Application.StatusBar = intCounter & " Seconds..." Application.Wait Now + TimeSerial(0, 0, 1) Next intCounter Application.StatusBar = False Application.DisplayStatusBar = bln End Sub In this way you can use status bar to display excel vba timer.