日期格式不对,下午肯定不行.应该:
Format(Now, "yyyy/MM/dd HH:mm:ss") = TextBox1.Text
采用日期进行比较更安全:
TextBox1.Text = Format(Now, "yyyy/MM/dd HH:mm:ss")
If Now = Date.Parse(TextBox1.Text) Then
MsgBox("It's time to go")
Timer1.Stop()
End If
这是一个定时程序啊,是要测试timer控件吗.
TextBox1.Text = "2011/12/07 10:35:00"
这句的时间是上午,肯定就不会运行了!
改一下就好!
而且只有当时间为TextBox1.Text = "2011/12/07 10:35:00"时才会弹出对话框。
明白问题所在了吗?