Home > Software engineering >  Vba array index beyond the scope
Vba array index beyond the scope

Time:11-27

Which master can tell me where is the problem? Data has a successful outcome, but it will show the message, thank you ~ ~

Sub test ()
The Open outFilePath For Output As # 2

For nRow=LBound (dataArray) To UBound (dataArray)
ArrLine=Split (dataArray (nRow), ", ")

OneLine=arrLine (LBound (arrLine)), 'The first column

For nCol=LBound (arrLine) + 1 To UBound (arrLine)
OneLine=oneLine & amp; ", "& amp; Range (" A1 "). Offset (nRow, nCol). The Value
Next

Print # 2, oneLine
Next nRow

Close # 2

End sub
  •  Tags:  
  • VBA
  • Related