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 |
How will you reverse a string in vbscript?
in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script
I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.
What is byref and byval parameters in vbscript?
What is the difference between javascript and vbscript?
Explain the constants in vbscript?
Explain some uses of vb script?
Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance
How to Import data from a file (file is on the desktop) to the data table
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
How to remove the spaces in a string Ex: "this is apple"
What is dictionary object in vbscript? Explain?