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
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 |
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 |
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 |
write a vb script to calculate factorial of a number?
i want to when we will write the scripts either after getting the build or after getting the SRS?
How can you have different number of cells for each row of a table in HTML?
What is loose binding? Why is it not a good practice to use it?
Explain the arrays in vb script?
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
Mention the rules for using option explicit statement?
What are subprocedures in vbscript?
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
What is parametrization ?
What are the advantages of vbscript?
Please Example programms on vbscript 1)writing functions and calling functions