Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


While writing script using For Next Statement in QTP, I try
defining the variable in Lib File I am getting syntax error
whereas if I use the variable in script file, the script
works fine. Can anyone help me in finding the reason behind
this?.
E:g

Dim intStartRow (Define in Lib File----- say abc.vbs)

Dim intRow (If I define this variable in Lib file I am
getting Syntax error where as if I define in the script
file ---- say xyz.mts the script works fine)

IntStartRow=2

For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count

‘Some Code here

Next



While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am..

Answer / jay prakash

should be some simple error in ur declaration. Nothing big
in this.

Do as below:

In Lib file, MyLib.vbs:
Dim i
i=10

In Script File
msgbox i

Include the lib file and run the script. No error.

If you can share the script i may be able to help u in
identification of your error.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how can I read text in browser and export the same into text file?

5 Answers   HP,


how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)

3 Answers  


in order to start automation testing what we should require (entry level to automation testing)

2 Answers  


I have the script like this: Browser("Philips Web Login").Page("Philips CL DMS2 Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. If i want to get that value "DC3701737" in to a variable, how? pls let me know if you didn't get the question. Help me out in this.

2 Answers  


What test cases can you automate using QTP?

0 Answers  


how will you check how many members visited the website www.infosys.com?

0 Answers   Logica CMG,


How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance

2 Answers   BirlaSoft,


what are the drawbacks for record and payback in qtp

3 Answers  


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

0 Answers  


Hi, Any one have the crack for QTP 10.0,if so could you please send it to phanijuly10@gmail.com

2 Answers  


distinguish between old version and new version QTP features.

0 Answers   CTA,


How many types of Recordings are there in QTP and what are they?

7 Answers   Dangote, First Indian Corporation,


Categories