Transferring data from a listbox to an array

The programmer would enter the information in a list box then hide this box from the user (Preferences). This allows the program to use the same test data at all times. This is the same as READ DATA in other languages. Shown below is the program from today’s lesson.

Private Sub CmdStart_Click()
'load an Array with data from a list box
'list box is hidden on the form
'List Boxes count from 0 so add a heading to the fist item
Dim Number(20) As Integer
Call Load_Array(Number())
Call Display_Array(Number())
End Sub

Private Sub Load_Array(ByRef Number() As Integer)
Dim Counter As Integer 'local Variable
For Counter = 1 To 20
Number(Counter) = LstNumbers.List(Counter)
Next
End Sub

Private Sub Display_Array(ByRef Number() As Integer)
'Standard procedure as used in previous programs
Dim Counter As Integer 'local Variable
For Counter = 1 To 20
Form1.Print Number(Counter)
Next
End Sub