'窗体加入1个文体框,2个命令按钮,1个标签 和1个时间控件
'这个用到了DateDiff函数,我觉得这个应该能满足你的要求
Option Explicit
Dim n As Long
Dim dt As Date
Dim date1 As Date
Dim date2 As Date
Private Sub Command1_Click()
Timer1.Enabled = False
End Sub
Private Sub Command2_Click()
date1 = Time
date2 = Format(Text1.Text, "hh:mm:ss")
dt = date1 + date2
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Form_Load()
Text1.Text = "00:03:00"
Command1.Caption = "停止"
Command2.Caption = "开始"
End Sub
Private Sub Timer1_Timer()
n = DateDiff("s", Time, dt)
Label1 = Format(TimeSerial(0, 0, n), "hh:mm:ss")
If n = 0 Then End
End Sub
温馨提示:答案为网友推荐,仅供参考