Made this little thing so that you can search for a word in any text file in a certain path, and it will tell you if it contains the word in text1.text...kind of like a extended text search thingy
VB Code:
  1. Option Explicit
  2. Dim ff As Integer
  3. Dim mypath As String
  4. Dim p As String
  5. Dim strbuff As String
  6.  
  7. Private Sub Command1_Click()
  8. mypath = "C:\"
  9.  p = Dir(mypath, vbDirectory)
  10.  Do Until p = ""
  11.         If InStr(p, ".txt") Then
  12.         ff = FreeFile
  13.             Open mypath & p For Binary As #ff
  14.                 strbuff = Input(LOF(ff), ff)
  15.                     If InStr(strbuff, text1.Text) Then
  16.                       List1.AddItem p
  17.                     End If
  18.         End If
  19.        
  20.         p = Dir
  21. Loop
  22. End Sub