我需要将数据从 Excel 范围复制到数组中。我正在使用以下代码,但它显示错误“预期数组”。
Dim filename As String
Dim arraysize As Integer
arraysize = 50
I = 1
Do Until ThisWorkbook.Sheets("sheet1").Cells(I, 1).Value = ""
filename(arraysize) = ThisWorkbook.Sheets("sheet1").Cells(I, 1).Value
I = I + 1
Loop