VB timer
来源:百度知道 编辑:UC知道 时间:2024/05/17 04:14:12
Private Sub Timer1_Timer()
Form2.Caption = Now
Dim h, m As Integer
h = Hour(Now)
m = Minute(Now)
If h = 19 & m = 00 Then
MsgBox "123455"
End If
End Sub
为什么运行的不对啊 快来个师傅帮忙啊
Form2.Caption = Now
Dim h, m As Integer
h = Hour(Now)
m = Minute(Now)
If h = 19 & m = 00 Then
MsgBox "123455"
End If
End Sub
为什么运行的不对啊 快来个师傅帮忙啊
& 在VB中是连接符 换成 and
h = 19 & m = 00 不能连等,VB不支持这样的格式!
f h = 19 and m = 00 Then
Private Sub Timer1_Timer()
Form2.Caption = Now
Dim h, m As Integer
h = Hour(Now)
m = Minute(Now)
If h = 19 and m = 00 Then
MsgBox "123455"
End If
End Sub
把 if h = 19 & m = 00 Then 改成 If h = 19 And m = 0 Then