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