I have string like hp company.print tis like company hp.write a program in vbscripting

Answer Posted / jp mumbai

Hi,

We can write a code in 2 ways. one is Generic Code and another is Hard Code.

In Generic Code:

Str="hp company"
ArrayStr=Split(Str)

For i = uBound(ArrayStr) to 0 Step-1
expStr=expStr &" "& ArrayStr(i)
Next

msgbox expStr

-------------------------------------------------

In Hard Code:

Str="hp company"
ArrayStr=Split(Str)

expStr= ArrayStr(1)&" "&ArrayStr(0)

msgbox expStr

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1417


What is the use of the formatdatetime function in the vbscript language?

553


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.

1442


How to open excel in vb script?

570


Explain the tristate constants in vbscript?

561






did any one attended interview in applabs if you had gone through plz tell me the procedure

1854


There are 5 web pages.write a script to click the button on 4th web page.

2938


can anyone tell me the procedure of interview held in applabs

1750


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2903


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

1243


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

607


Mention what is vbscript procedures?

537


Anyone have qtp11.0 crack?

2387


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

862


Explain the operator precedence in vb script?

656