在VBA中如何用一個數(shù)組給另一個數(shù)組賦值?
通過數(shù)組循環(huán)的方式進行數(shù)組賦值。示例: Dim names '定義一個初始化數(shù)組 Dim dest(3) '定義一個要賦值的數(shù)組 '賦值 names = Array("小明", "小紅", "效力", "張明", "王武", "", "", "", "", "", "") '通過Ubound()函數(shù)計算上界,LBound計算數(shù)組下界 For i=LBound(dest) to UBound(dest) dest(i) = names(i);//數(shù)組賦值 next i