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

How can you save and Get data from Clipboard/ Recordset object consists what?

0 Answers  


How to get Cursor position using API?

2 Answers  


Types of cursors in RDO.

0 Answers  


How would you add column headers in listview control?

0 Answers  


Difference between Recordset and Querydef?

2 Answers   3i Infotech, IBM, TCS,


What are the different compatibility types when we create a COM component?

2 Answers  


What is shortcut menu and explain "The ole control's shortcut menu".

0 Answers  


How do I dial a phone number without using the MSCOMM VBX?

0 Answers  


Which tool is used to configure the port range and protocols for DCOM communications?

2 Answers  


Which datatypes in Visual Basic are capable of accepting Nulls?

1 Answers  


What is the difference between adodc and adodb in vb?

0 Answers  


What does the NewIndex property return?

2 Answers  


Categories