| || |
sqa-suite-users digest: June 11, 2001
User Ken King (KKing@quantumshift.com) posted:
I am try to find the size of an array I created from a function I wrote.
'Ubound' works when something is in the array. Occasionally my array will
be empty. When the array I am checking with Ubound is empty, I get 'Runtime
error '9' Subscript out of range. Does anyone know what function to use for
checking an empty array?
88 Rowland Way
Novato, CA 94949
mailto: email@example.com http://www.quantumshift.com
Tel: (415) 209-2312
Fax: (415) 898-4958
Re: sqa-suite-users digest: June 11, 2001
User MArk B. (firstname.lastname@example.org) posted:
One of the failings of Robot
You need to do something like this
'Turn off error handling
On Error Resume Next
iArraySize = UBound(aryMyArray)
'Put the error number into a variable
iErrNum = Err
'Turn error handling back on
On Error Resume 0
'Check to see if there was an error
If iErrNum <> 0 Then
'There was an error
' WE MUST ESCAPE FROM HERE ! ! ! !
'There was something in the array and we got it
Do something useful
Disclaimer excluded because it would be too damn long and slow down the
internet. Just consider yourself warned.
"Ken King" <KKing@quantumshift.com> wrote in message