Quote Originally Posted by om-yousif
if i have this file (attached)

i need to search for a word
if word found then
search for "***" in next lines
if "&" found then
delete "***"
copy this line in a textbox
end if
end if

stop searching if empty line found



how can i write this in vb
You can do string manipulation... but you have to be more clear in describing what you need... in your sample file, there's no "&"... and do you intend to delete just the line with "***" and retain the succeeding GLOSS line? and do you mean to update the textfile or just delete from the working data structure (array or string)?