how to find number of characters(letter a) in
the sentence
Rain Rain Go away

Answer Posted / aditya

Dim sentence, testchar, arr
sentence = Inputbox(" Enter a sentence" )
testchar = Inputbox(" The charecter to be checked")
arr = split(sentence, testchar)
msgbox "Total number of charecter " & testchar & " in sentence " & sentence & " is " & ubound(arr)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1509


Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji

1232


How to capture a runtime error in vbscript?

623


Mention how you can call vbscript functions?

575


Explain the constants in vbscript?

557






When to use function procedures and what are its characteristics?

544


What is purpose of scripting.filesystemobject class in vbscript?

616


How are values assigned to string type and numeric type variables?

533


Which constant is used for print and display functions and works as same as pressing enter key?

524


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 ?

1544


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1038


i need to sort the data using qtp script for this how i need to write a qtp script

3212


i have a problem with this error(this error related edit and delete button,when i click this button in datagrid..i will get this error)"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." this is my code : <%@ Page Language="VB" Debug="false" %> <%@ import Namespace="Sytem.Data" %> <%@ import Namespace="System.Data.OleDB" %>

(Search Based On Staff I.C No) IC.No (XXXXXX-XX-XXXX)   ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> Total Leave Taken : Days

2340


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2385


What is the event handling in vbscript?

556