UBound(lngTatalRs) 最大下标
LBound(lngTatalRs) 最小下标
相减就可得到共有几个

解决方案 »

  1.   

    如果是想知道上下标的话 用ubound 和 lbound
      

  2.   

    ubound返回数组上界
    lbount返回数组下界
      

  3.   

    事件并非如此简单
    如果某个数组是N维的,那......
    再如果这个数组是个未ReDim的动态数组,当你使用了LBound或UBound时,就会......
      

  4.   

    元素数目 = UBound(数组名) - LBound(数组名) + 1要想做的更好些
    当然是直接读取数组的SafeArray结构
    http://www.csdn.net/develop/read_article.asp?id=12902