Just a hint on how Excel and VBA manage ranges: There is never a zero
cell! Item(0) is 1 less than Item(1) and so if $C$9 is the 1st cell
(ie: Trips.Cells(1).Address) then it makes sense that Item(0) (ie:
Trips.Cells(-1).Address) is evaluated as $C$8!
When you dump a range into a variant you result a 2D array that is 1
based...
Dim vData As Variant
vData = Range("$C$9:$C$58")
...which results to vData having 50 rows and 1 column, which is the same
as...
Dim vData(1 To 50, 1 To 1)
...because there is no Row0 or Col0. Had your range started at $C$1
instead of $C$9 then Item(0) would either evaluate to ref the last cell
in ColB --OR-- throw an exception.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion