Automating QTP Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
Gotchas - Dim statements migrate to the top
The other day, someone wanted to know why the following didn't work:
count1 = abx.count() The reason is that the Dim gets instantiated when the function FIRST starts up. - WHEREVER you put the dim in the function.
So this occurs BEFORE the value for count1 gets calculated.
dim array1(count1)
So you are trying to dimension an array with a null variable. |