reading lines from a file by searching a word(instr) and
copying to other textfile,but its only copying only one
line but there are some other lines match criteria but not
copying to the files

Answer Posted / senthilg

givenstring=f1.Readall

Do
If InStr(st_pos, givenstring, "<indexTerm>") <> 0 Then
st_pos = InStr(st_pos, givenstring, ""<indexTerm>")
close_pos = InStr(st_pos, givenstring, "</indexTerm>")
find_String = Mid(givenstring, st_pos, (close_pos -
st_pos) + Len("</indexTerm>"))
st_pos=close_pos +1
End If

Loop While InStr(st_pos, givenstring, "<indexTerm>") <> 0


'Start String =<indexTerm>
'End String =</indexTerm>

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can Visual Basic be used for server-side scripting?

743


What is "NULL"?

1271


Can you tell me the properties of the controls?

1820


How would you run your ActiveX Document Dll?

1668


What are the scope of the class?

1781


What are forms in visual basic?

803


What is rdo in vb?

772


State about the different types of visual basic data?

796


Explain the usage of Web Browser Control?

1941


____ property is used to lock a textbox to enter a datas.

1396


What are the new events in textbox that has been included in VB ?

1597


What is the use of Scalewidth and ScaleHeight Proeperty?

1734


i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI).

2065


how to use unicode data in vb6 regarding to telugu language, my output is in only telugu language

3375


Explain the types of Views in Listview Control.

2545