if time>cdate("22:55:30") then msgbox("warning!!!")

解决方案 »

  1.   

    用time得到系统时间,当系统时间=22:55:30时作出提示。
      

  2.   

    以上代码是放在timer控件的Timer事件里吗?
      

  3.   

    加一个timer控件timer1.Interval 设置为1000
    Private Sub Timer1_Timer()
    Dim sd As String
    Dim we As String
        Text1.Text = Time
        sd = "15:23:20"
        If Text1.Text = sd Then
        we = MsgBox("快关灯了!关机睡觉吧!要不然会弄坏电脑的!!", vbExclamation)
        Exit Sub
        End If
    End Sub
      

  4.   

    //开机的时候提醒//
    如果你用的WIN98,将你做的程序
    加入WIN98的计划任务中(在桌面的右下角的系统托盘区中)
    ——》选择在计算机启动时运行你的程序!
      

  5.   

    Private Sub Timer1_Timer()
    Dim sd As String
    Dim we As String  
    dim TimeNow as time
     sd=TextTime.text
     if sd=TimeNow then 
       we = MsgBox("快关灯了!关机睡觉吧!要不然会弄坏电脑的!!",vbExclamation)
        Exit Sub
        End If
    End Sub
      

  6.   

    同意楼上的
    Private Sub Form_Load()'中! 
       Timer1.Interval = 1000
    End Sub Private Sub Timer1_Timer()
    Dim sd As String
    Dim we As String
        Text1.Text = Time
        sd = "15:23:20"
        If Text1.Text = sd Then
        we = MsgBox("快关灯了!关机睡觉吧!要不然会弄坏电脑的!!", vbExclamation)
        Exit Sub
        End If
    End Sub