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

create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2161


how to check whether link is disabled in QTP??

5631


Is vbscript a case-sensitive or case-insensitive?

754


I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

1771


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

3220






while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

1568


Explain about .wsf files?

622


How to write VB script for login module?

2678


What is the difference between vb debugger and the script debugger?

589


How to delete a cookie using vbscript?

555


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

1965


What are the disadvantages of vbscript?

655


Explain the scope of the variables using dim, public, and private keywords respectively.

722


Which function is used to perform string comparison?

566


hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?

1740