Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



reading lines from a file by searching a word(instr) and copying to other textfile,but its only co..

Answer / 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

reading lines from a file by searching a word(instr) and copying to other textfile,but its only co..

Answer / pradeep kumar

Read each line in a loop, campare with required string with
instr and concatenat the whole line

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Visual Basic Interview Questions

which argument can be used to make a menu item into bold?

2 Answers  


Is there any way to pass a variable to a form apart from using global variables?

0 Answers  


what are the types of cursors in DAO?

0 Answers  


I belive VB6 is a powerful and matured tool that any other front end tool, why is it outdated? is it because of lack of awareness or because of difficult to use?

5 Answers   HCL,


what is the Difference between listbox and combo box?

2 Answers  


what component is used in vb to link to the database?

2 Answers   Satyam,


what are the Types of LockEdits in RDO?

0 Answers  


What is file in vb?

0 Answers  


What will happen if you issue a Resume statement after handling an error?

3 Answers  


___ VB constant make the menu item in centre.

0 Answers  


Which type of object requires this object?

0 Answers  


How to get freefile location in memory?

0 Answers   FSS,


Categories