分类：电脑/网络-程序设计
问题：VB数组问题我在VB程序中print了一组数组sz（x，2），现 
我在程序中print了一组数组sz（x，2），现在我想把我print的这组数组用excel打开，怎么办？跪求代码orz！！
回答：你在Exce中建立一个宏，然后在宏中实现. 如下：Sub haha()Dim sz(10, 2)Dim table(26) As StringDim colName As Stringtable(0) = "A": table(1) = "B": table(2) = "C": table(3) = "D": table(4) = "E": table(5) = "F": table(6) = "G": table(7) = "H": table(8) = "I": table(9) = "J"Dim num As IntegerFor i = 0 To 9    For j = 1 To 2        sz(i, j - 1) = i * j        num = i + 1        colName = Trim(table(i)) + Trim(Str(j))        Range(colName).Select        ActiveCell.FormulaR1C1 = Str(sz(i, j - 1))    NextNextMsgBox ("haha")    End Sub