I have this code it works great.
It opens a file and searchs for a value. once its done with that file it goes to the next file. I have 3 files total.
I need to give the total of the value ID. in each file
Does anyone know how to do this?
Thanks in advance
Dim File As String
Dim TextLine As String
Dim ssn As String
Dim name As String
Dim i As Integer
Dim stucntr As Integer
Dim filecntr As Integer
stucntr = 0
For filecntr = 1 To 3
File = "C:\VB_PROJECTS\File\JQ0" & CStr(filecntr) & "H301"
If (FileExists(File) = True) Then
Open File For Input As #1
If Not EOF(1) Then
Do While Not EOF(1)
Line Input #1, TextLine
If InStr(TextLine, "ID:") > 0 Then
MsgBox "hello"
End If
Loop
Close #1
End If
End If
Next
It opens a file and searchs for a value. once its done with that file it goes to the next file. I have 3 files total.
I need to give the total of the value ID. in each file
Does anyone know how to do this?
Thanks in advance
Dim File As String
Dim TextLine As String
Dim ssn As String
Dim name As String
Dim i As Integer
Dim stucntr As Integer
Dim filecntr As Integer
stucntr = 0
For filecntr = 1 To 3
File = "C:\VB_PROJECTS\File\JQ0" & CStr(filecntr) & "H301"
If (FileExists(File) = True) Then
Open File For Input As #1
If Not EOF(1) Then
Do While Not EOF(1)
Line Input #1, TextLine
If InStr(TextLine, "ID:") > 0 Then
MsgBox "hello"
End If
Loop
Close #1
End If
End If
Next