答案1
我得到了答案地点。一切如预期般运转。
Sub Demo_StringSearch_txt()
Dim fPath As String: fPath = "C:\test\search\"
Dim strContent As String
Dim intFF As Integer: intFF = FreeFile()
Dim myArr
Dim i As Long, j As Long
myArr = Range("A1", Cells(Cells(Rows.count, 1).End(xlUp).Row, Cells(1, Columns.count).End(xlToLeft).Column)).Value
For i = 2 To UBound(myArr, 2)
Open fPath & myArr(1, i) For Input As #intFF
strContent = Input(LOF(intFF), intFF)
Close #intFF
For j = 2 To UBound(myArr)
If InStr(strContent, myArr(j, 1)) > 0 Then
myArr(j, i) = "Yes"
End If
Next
Next
Range("A1").Resize(UBound(myArr), UBound(myArr, 2)) = myArr
End Sub