How can i count "spaces" in any sentence or a string
if suppose " It is a Testing question"
Here we have 4 gaps(spaces)
Is there any function to find out spaces between words

Answer Posted / annie

a=inputbox("enter the string")
countspaces=len(a)-len(replace(a," ",""))
msgbox "count is" & countspaces

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain calling sub procedure.

620


I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing

1483


Explain the concept of object repository and how qtp recognises objects?

526


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1346


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

579






How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

623


tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?

1523


Is it possible to change the property value at runtime? How it is possible?

575


Explain the features and benefits of quick test pro(qtp)?

512


Does QTP record on Objects created on XWindows Environment?

1656


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

1579


Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?

1393


Hybrid framework supports Descriptive programming. Is it true?

647


Have you used xml check point in your project?

552


How can I use Call dlls in QTP ?

1788