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

What is Seek Method which type of record set is available this?

1695


What is a thread pool and how are the threads within a thread pool managed?

1830


___,___ and __ are difference between image and picture controls.

1321


Explain about the creation of EXE files with Visual Basic?

780


___,___ arguments will be used to run a executable program in shell function

1464


How would you create properties by using class Builder Wizard?

1708


How to use hyperlink?

800


How would you navigate between one document to another document

1411


How come I get a "No Current Record" error when I use a a Data Control on an empty table?

1296


Can any one please suggest which institute is providing Advance Excel & VBA Macros in Excel training in Hyderabad.

1935


by writing MACRO CODE,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). ex: custdetails custname lastname locaton mobile pincode custdetails raj tony hyd 555555 521245 servcreqrd srvce# srvcename location srvcepincode servcreqrd 754 drilling hyd 521784 for the above example in the another workbook retrive data like this custname Raj srvce# 754 srvcepincode 521784. while retrieving data control will search cell by cell for each row.

1941


How would you attach pictures in column headers of List View Control?

1901


Is visual basic easy?

748


What is data binding in vb net?

713


What is ActiveX? Explain.

1651