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

write a vb script to calculate factorial of a number?

5 Answers  


i want to when we will write the scripts either after getting the build or after getting the SRS?

3 Answers  


How can you have different number of cells for each row of a table in HTML?

2 Answers  


What is loose binding? Why is it not a good practice to use it?

0 Answers  


Explain the arrays in vb script?

0 Answers  


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

0 Answers  


Mention the rules for using option explicit statement?

0 Answers  


What are subprocedures in vbscript?

0 Answers  


accept an email id & validate it .email id should not exceed 25 characters the mail id should contain 3 characters excluding domain name,@ and .(dot) the last 3 characters of the domain should be net,com or org

2 Answers  


What is parametrization ?

9 Answers  


What are the advantages of vbscript?

0 Answers  


Please Example programms on vbscript 1)writing functions and calling functions

2 Answers   CIL, TCS,


Categories