Results 1 to 17 of 17

Thread: Timer

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    537

    Resolved Timer

    I am going to make a timer that takes a message via an inputbox, then lets the user input a time via a text box and thes display the message that the inputbox got at the beginning in a message box, but I don't know how to make the message appear at the specified time. Here is my code, please help...

    Code:
    Option Explicit
    Dim intmsg As Integer
    Dim Txtstg As String
    
    Private Sub Command1_Click()
    If (Text1.Text = "") Or (Text1.Text = "- Time goes here -") Then
    MsgBox "You have to type a number in either minutes or seconds!", vbOKOnly + vbCritical, "Error"
    Else
    Form1.Visible = False
    End If
    End Sub
    
    Private Sub Form_Load()
    Txtstg = Trim(InputBox("What do you want your message to say?", "What your message says", "Type here..."))
    If Txtstg = "" Then
    End
    End If
    End Sub
    
    Private Sub Text1_Click()
    If Text1.Text = "- Time goes here -" Then
    Text1.Text = ""
    End If
    End Sub
    
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 48) And (KeyAscii >= 32) Or (KeyAscii > 58) Then
    KeyAscii = 0
    End If
    If Text1.Text = "- Time goes here -" And (KeyAscii > 47) And (KeyAscii < 58) Then
    Text1.Text = ""
    End If
    End Sub
    I need to make the message appear when the clock reaches the user-inputted time.


    Thanks,
    Sir loin
    Last edited by Sir Loin; Apr 18th, 2005 at 05:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width