وجدت الحل عبر هذا الكود
شكرا لكم
كود :
("Dim lines() As String = IO.File.ReadAllLines("file.txt")
For i = 0 To lines.Count - 1
If lines(i).Contains("word") Then
MsgBox("line index=" & (i + 1))
Exit Forشكرا لكم
