Run-time error 6 - OVERFLOW

后端 未结 1 1798
野性不改
野性不改 2021-01-23 06:52

i want to parse a large size of text file, the size of the text file is 257MB. i use listview to view the parse data after i parse the large file i want to save it as an excel f

1条回答
  •  不思量自难忘°
    2021-01-23 07:25

    If your number of items (ListView1.ListItems.Count) is greater than 32767 (the max number for an Integer), you'll get an overflow error.

    Change your declaration to:

    Dim i as Long
    

    A Long will allow values from -2,147,483,648 through 2,147,483,647.

    For more info, refer to the MSDN VB6 Data Type Summary.

    0 讨论(0)
提交回复
热议问题