How to find the Dimensions of a Variant Range
Dim lb1&, lb2&, ub1&, ub2&, IRange
lb1 = lbound(IRange,1)
ub1 = Ubound(IRange,1)
lb2 = lbound(IRange,2)
ub2 = Ubound(IRange,2)
--
Regards,
Tom Ogilvy
"Frans Verhaar" wrote:
I have a worksheet contains a named range referenced to cells A1:C3 called
InputRange
I read this range into a variant and then want the dimensions of the
variant.
Sub ReadRange()
Dim IRange() As Variant
IRange() = Range("InputRange")
End Sub
I tried but I can only find the vertical dimension with the following:
MsgBox UBound(IRange)
Can someone help me how to find the other dimension?
Thanks a lot on your ideas...
Frans
|