Error in QTP
Hi.
I am having some problems with the following code.
_________________________________________________
Dim Count
Dim BankCount
BankCount = Int (DataTable.Value("A", dtGlobalSheet))
Count = 0
Do until Count = BankCount
Count = Count +1
msgbox Count
msgbox BankCount
wait 1
Loop
_________________________________________________
The script runs successfully, however when the scripts Count = Bankcount, the execution cycle is looping back to the beginning of the script, and produces the following error.
Error:
Type mismatch: '[string: ""]'
Details:
Line (4): "BankCount = Int (DataTable.Value("A", dtGlobalSheet))".
Could someone please tell me:
1 - Why the script loops back to the beginning once Count = BankCount
2 - Why an error is being returned on the above line of code only on the second pass / why no error is returned on the above line of code on the first pass .. ??
Looking forward to seeing your thoughts / suggestions / script alteration recommendations ...
thanks - and happy new year
|