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...


sunday is sunday
monday
tuesday
wendesday
sunday
thursday
friday
saturday
sunday
sunday

how to count no of sunday in the text file from vb? Answer
me asap

Answers were Sorted based on User's Feedback



sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday ..

Answer / siva

text="sunday is sunday monday tuesday wendesday sunday
thursday friday saturday sunday sunday how to count no of
sunday"
coun=ubound(split(text,"sunday"))
msgbox coun

Is This Answer Correct ?    4 Yes 0 No

sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday ..

Answer / siva

Set fso=createobject("scripting.filesystemobject")
Set forread=fso.OpenTextFile("path\test.txt",1)
text=forread.ReadAll
coun=ubound(split(text,"sunday"))
msgbox coun

Is This Answer Correct ?    2 Yes 0 No

sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday ..

Answer / sha

Thanks siva

Is This Answer Correct ?    0 Yes 0 No

sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday ..

Answer / eswar

cnt =0
Set fso = CreateObject("scripting.filesystemobject")
Set f = fso.opentextfile("D:\test.txt",1)
While f.atendofstream<>true
x = f.readline
y = Split(x," ")
For i=0 to ubound(y)

If y(i) = "sunday" Then
cnt=cnt+1
End If
Next
Wend
MsgBox cnt

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

In our application qtp unable to indentify the menu items,we tried number of times to add objetcs into object repository but fail. through normal recording mode only objects going to add into repository but while running same recording script qtp showing a error like " unable to indentify the object". in repository there is no any properties and pro values for that object and also i tried with virtual object config also unable to find the object in application and in repository. Then what i have to do to identify menu objects????? can anybody hell me pls..............

2 Answers   Blue Star,


Differentiate javascript and vbscript?

0 Answers  


a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?

2 Answers  


How to copy from one script to another script in qtp

4 Answers  


Difference between Do while loop and while wend loop

1 Answers  


How do you create a recordset object in VBScript?

3 Answers  


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

0 Answers  


Which in-built function is used to format the number in the vbscript language?

0 Answers  


which one is more secure vb script or java script ??????? or both are same ??????

3 Answers  


pls tell me which is good book or site for vbscript?

1 Answers   Mind Tree,


Am working with web application. i faced one senario. i.e, webpage having webtable having two coloumns, in that first coloumn is for serial no and second coloumn is for mac address link, now i want to get first row second coloumn value, that having macaddress as link. Please help me how to get that link?

2 Answers  


how to write validation function for date in vb script

0 Answers  


Categories