|
-
July 26th, 2008, 11:20 PM
#19
Re: Finding strings in multiple files
Jeez, you make things tough...
Code:
ReDim str(5)
str(0) = "AAAAAA 1.1.1"
str(1) = "AAAAAB 1.1.1"
str(2) = "AAAAAC 1.1.1"
str(3) = "AAAAAA 1.1.2"
str(4) = "AAAAAB 1.1.2"
str(5) = "AAAAAA 1.1.2"
'str() = Split(strBuff, vbCrLf)
' MsgBox "There are " & UBound(str) + 1 & " lines in the file"
Dim words() As String, y As Integer, max2 As String
max2 = "0.0.0"
For x = 0 To UBound(str)
words() = Split(str(x), " ")
For y = 0 To UBound(words)
If y = 1 Then
If words(y) > max2 Then
max2 = words(y)
st = st & words(0) & " " & max2 & vbCrLf
End If
End If
Next y
Next x
MsgBox st
Last edited by dglienna; July 26th, 2008 at 11:24 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|