How to find length of array in QTP

Example -


Below code will find the length of array  in QTP.

print (ubound(arr) + 1)

Ubound returns the last index in array - so length of array will be +1. This will be total number of elements in array.