Imagina q este es el archivo. En mi caso esta en H:\hola.txt:
asfds2fds64fds
1a1a1Esta la linea =P
dsfsdfds
sd
fsd
f
fsd
fsd
gf
fg
fhjg
j
jk22
l2kj
Ese seria nuestro archivo de texto. Ahora usa este code:
Private Sub Form_Load()
Open "H:\hola.txt" For Binary As #1
Dim Todo As String
Todo = Space(LOF(1))
Get #1, , Todo
Close #1
Dim Linea As Variant
Linea = Split(Todo, vbNewLine)
For n = 0 To UBound(Linea)
If Left(Linea(n), 5) = "1a1a1" Then
Text1.Text = Linea(n)
Exit Sub
End If
Next n
End Sub
Si no kieres q se vea el 1a1a1pon esto:
Private Sub Form_Load()
Open "H:\hola.txt" For Binary As #1
Dim Todo As String
Todo = Space(LOF(1))
Get #1, , Todo
Close #1
Dim Linea As Variant
Linea = Split(Todo, vbNewLine)
For n = 0 To UBound(Linea)
If Left(Linea(n), 5) = "1a1a1" Then
Text1.Text = Mid(Linea(n), 6)
Exit Sub
End If
Next n
End Sub
espero q te sea util
1S4ludo