Sub 按钮1_Click() UserForm1.Show EndSub Sub js() If UserForm1.CommandButton1.Caption = "停止计时" Then Application.OnTime Now + TimeValue("00:00:01"), "js" UserForm1.Label1.Caption = Format(UserForm1.Label1.Caption + 1, "000") EndIf EndSub
Sub 按钮1_Click() UserForm1.Show EndSub Sub js() If UserForm1.CommandButton1.Caption = "停止计时" Then Application.OnTime Now + TimeValue("00:00:01"), "js" UserForm1.Label1.Caption = Format(UserForm1.Label1.Caption + 1, "000") EndIf EndSub