Dim strCmp As String
Dim strRes As String
Set objFile = CreateObject("Scripting.FileSystemObject")
Set stmFile = objFile.OpenTextFile(App.Path + "/Data.txt", 1)
strCmp = stmFile.readline
stmFile.Close
Set objFile = Nothing
Set stmFile = Nothing
Private Sub Text2_Change()
If Len(Text2.Text) >= 5 Then
SendKeys "{Tab}"
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 38 Or KeyCode = 37 Then
Text1.SelStart = 0
Text1.SelLength = Text1.MaxLength
Text1.SetFocus
End If
If KeyCode = 13 And Len(Text2.Text) = 5 Then
SendKeys "{tab}"
End If
End Sub