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
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 |
How you will rate urself in QTP in the range of 0 to 5
what is frame work?
What type of framework you are using in your company and explain it?
How do we run the scripts in QTP ?? what are the three options....
Can anybody help me for vb script in qtp? give me examples for practice plz.
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
What is keyword view in qtp?
Why we have to split actions in a test?
How can we redirect QTP results in to a excel sheet after the execution
how to get no.of non empty rows in a excel sheet through vb-script
What expansion of "MIC" in MICPASS (TEST ReportPAGE)
Write VB script to test given number is Prime Number