here the code i have.... I don't know how I would add ur code to it though.... how would i do it.. as you can see, i tried to do it, though unsuccessfully....
VB Code:
Dim CANCELIT As Boolean Private Sub Pause(Length As Long) Dim OldTime As Long OldTime = GetTickCount Do DoEvents If GetTickCount >= OldTime + Length Then Exit Do Loop End Sub Private Sub Command1_Click() Dim Acc As Integer If IsNumeric(Text2.Text) Then Acc = Text2.Text Else MsgBox "Please enter a numeric value" End If Pause (1000) Function Add(strMessage As String) As String strMessage = Text1.Text Dim i As Integer For i = 1 To Len(strMessage) If CANCELIT = True Then CANCELIT = False Exit Function End If SendKeys Mid$(strMessage, i, 1) Pause (Acc) Next End Function End Sub Private Sub Command2_Click() Text1.Text = "" End Sub Private Sub Command3_Click() CANCELIT = True End Sub




Reply With Quote