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...
I need to make the message appear when the clock reaches the user-inputted time.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
Thanks,
Sir loin




Reply With Quote