Nếu bạn đang tự hỏi làm thế nào tôi có thể tạotimer trong excel Câu hỏi:

Đếm ngược từ 30 đến 0 giây sẽ được hiển thị trên thanh trạng thái.

Trả lời:

Chèn mã sau vào mô-đun tiêu chuẩn.

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.