Find Method Used within Values in an Array of Ranges
if each element is a range object, then thay each are on a specific sheet and
need no qualification.
however, you can't just use myarray.find with an array of range objects.
if all the references are on a single sheet you might try
set r = myArray(lbound(myArray))
for i = lbound(myArray)+1 to Ubound(myArray)
set r = Union(r,myarray(i))
Next
set c = r.find(1,lookin:=xlvalues),
else you will have to search each element of the array in a loop.
--
Regards,
Tom Ogilvy
" wrote:
Hello,
I am trying to search through the elements in an array (each of which
is a range object).
I would like to use something like
set c=worksheets(1).myarray.find(1,lookin:=xlvalues),
but this doesn't work.
Any tips?
Regards,
Calvin
|