dim a(3)for i = 0 to UBound(a)if IsEmpty(a(i)) thenj = j+1end ifnextif j = UBound(a)+1 thenmsgbox "a("&UBound(a)&")是空数组"elsemsgbox "a("&UBound(a)&")不是空数组"end if————————————用IsEmpty()函数,如果是空数组的话就所有的数组元素都会是空的。