How to find count of elements in a dynamic array?

  • Thread starter öÉÇÁÊÌÏ× òÏÍÁÎ
  • Start date
Ö

öÉÇÁÊÌÏ× òÏÍÁÎ

Help please!

How to find count of elements in a dynamic array?

Example:

Dim V as Variant, j as Integer

V = ActiveWorkbook.ActiveSheet.Range("A4:F4").Value

' It is necessary to treat values of all array cells

For j = 0 to ???

a = V(j)

......

Next j
 
A

Andy Pope

Hi,

Have a look at the help on Ubound() and LBound()
Note the range will return a 2 dimensional array.

V = ActiveWorkbook.ActiveSheet.Range("A4:F4").Value
MsgBox LBound(V, 2) & " " & UBound(V, 2)

Cheers
Andy
 
?

???????? ?????

Have a look at the help on Ubound() and LBound()
Note the range will return a 2 dimensional array.

V = ActiveWorkbook.ActiveSheet.Range("A4:F4").Value
MsgBox LBound(V, 2) & " " & UBound(V, 2)

Cheers
Andy

Yes, I give thanks!
 
Top