我想写一个小程序,每过5分钟就跳出一个对话框。点确定后程序才继续执行,否则不记时,该如何写?我刚学,写成这样好象不行哦,请赐教!谢谢
Dim i
Private Sub Form_Load()
Timer1.Interval = 60000
i = 0
Form1.Hide
End SubPrivate Sub Timer1_Timer()
i = i + 1
If i = 5 Then
MsgBox ("Take care of yourself!")
i = 0
End If
End Sub
Dim i
Private Sub Form_Load()
Timer1.Interval = 60000
i = 0
Form1.Hide
End SubPrivate Sub Timer1_Timer()
i = i + 1
If i = 5 Then
MsgBox ("Take care of yourself!")
i = 0
End If
End Sub
Private Sub Timer1_Timer()
i = i + 1
If i = 5 Then
If MsgBox("Take care of yourself!", vbOKCancel) = vbOK Then
i = 0
Else
End If
End If
End Sub
Private Sub Timer1_Timer()
i = i + 1 '这句不要
If i = 5 Then '这句不要
MsgBox ("Take care of yourself!")
i = 0 '这句不要
End If
End Sub
Timer1.Interval = 60000
Form1.Hide
End SubPrivate Sub Timer1_Timer()
Static i As Integer
i = i + 1
If i = 5 Then
MsgBox ("Take care of yourself!")
i = 0
End If
End Sub
i = i + 1
If i = 5 Then
If MsgBox("Take care of yourself!", vbOKCancel) = vbOK Then i = 0
End If
End If
End Sub
MsgBox("Take care of yourself!", vbOKCancel+vbSystemModal)