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



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

Answer / 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

More VB Script Interview Questions

Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

0 Answers   Quest,


Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble

0 Answers   GCE, Sapient,


write a vb script to generate 3*3 matrix

2 Answers  


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

0 Answers  


How to Import data from a file (file is on the desktop) to the data table

0 Answers   IBM,






What are the naming conventions while declaring a variable in the vbscript language?

0 Answers  


how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

0 Answers  


Mention the environments where vbscript could be run?

0 Answers  


which is the bset training centre to learn automation tools?

2 Answers  


how to write vb script code for login gmail page by using notepad and how to run script in notepad

1 Answers  


I have a webtable and many objects are embedded in side.(like buttons,checkboxes etc). How to know how many such objects are there? what is the class of that objects?

1 Answers   HP, TCS,


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

0 Answers  


Categories