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

What is the purpose of on error resume next statement?

0 Answers  


what is the features of visual basic?

0 Answers  


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

3 Answers   TCS,


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

0 Answers  


how to retrieve native property value in runtime?

1 Answers   Hexaware,


What are the 2 ways in which a variable can be declared in the vbscript language?

0 Answers  


how to acces the remote mechine using vb cript(QTP)

0 Answers   TCS,


Explain about constants in vb script?

0 Answers  


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?

10 Answers   Cap Gemini, CTS,


How to Import data from a file (file is on the desktop) to the data table

1 Answers   IBM,


What is difference between Active screen and movie screen recorder in QTP 9.2?

1 Answers  


Categories