Private stopIt As Boolean
Private Sub Command1_Click()
Dim shuzhi As Double
Dim shuzhi1 As Double
Text1.Text = "正在运行"
For shuzhi = 1 To 60000
If stopIt Then Exit Sub
DoEvents
For shuzhi1 = 1 To 20000
Next shuzhi1
Next shuzhi
Text1.Text = "完成"
End Sub
Private Sub Command2_Click()
Text1.Text = "中断运行"
stopIt = True
End Sub