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 you will rate urself in QTP in the range of 0 to 5

0 Answers   Genpact,


what is frame work?

2 Answers   Wipro,


What type of framework you are using in your company and explain it?

4 Answers   CTS,


How do we run the scripts in QTP ?? what are the three options....

4 Answers   HCL,


Can anybody help me for vb script in qtp? give me examples for practice plz.

0 Answers  


how can we write descriptive programming for menus when qtp is not able to identify it..and how can we write descriptive programming for partially identified and non standard objects..do i have to map the objects before writing the script

2 Answers  


What is keyword view in qtp?

0 Answers  


Why we have to split actions in a test?

4 Answers  


How can we redirect QTP results in to a excel sheet after the execution

3 Answers   SAP Labs, Virtusa,


how to get no.of non empty rows in a excel sheet through vb-script

2 Answers   HP,


What expansion of "MIC" in MICPASS (TEST ReportPAGE)

11 Answers   TCS,


Write VB script to test given number is Prime Number

5 Answers   Oracle,


Categories