如题所述
Private Sub sub1()
Dim s(3) As String
Dim i As Long
s(0) = "a"
s(1) = "b"
s(2) = "c"
For i = 0 To 2
Sheet1.Cells(1, i + 1) = s(i) '在工作表Sheet1 1行中将数组元素显示出来
Next
End Sub
Dim s(3) As String
Dim i As Long
s(0) = "a"
s(1) = "b"
s(2) = "c"
For i = 0 To 2
Sheet1.Cells(1, i + 1) = s(i) '在工作表Sheet1 1行中将数组元素显示出来
Next
End Sub
温馨提示:答案为网友推荐,仅供参考