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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about tristate constants?

998


Explain sga memory structures?

1008


after medical test,when will be the police verification

2146


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1914


Can u describe what kind of testing are for OTC derivates by banks.

2119


Description.Create

2624


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

2271


how to automatically update the sql server2005 database records when insert in vb6?

1935


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

1063


How can the spaces from the string be removed?

999


what is the use of QCUtil? explain with one example?

7035


Which function allows you to instantiate an object given its programmatic identifier or progid?

1014


How to add actions in driver script to run those actions in QTP?

1925


What is select case statement?

1029


What if you do not specify anything when you call a procedure?

1108