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

What is dictionary object in vbscript? Explain?

1119


Explain about constants in vb script?

971


what types of bugs will we find out in banking projects for automation testing?

2171


How will you convert a string to upper case string using vbscript?

934


Explain the tristate constants in vbscript?

977


What's the difference between vbscript and vb.net?

1038


Mention what if you do not specify anything when you call a procedure?

927


What is vbscript language used for and which earlier language is it modeled upon?

953


Does VB/Win make standalone .EXE files?

3349


How to make sure that items in a wintree are sorted al?

2782


1. How do declare public variable in vb scripts?

2041


Which operator can be used to check if two numbers are equal or not in vbscript?

1099


How will you get a combined string from array of string in vbscript?

900


How to write functions and sub in vb script?

1055


What are the rules to name variable in vbscript?

1021