Listbox into Array Program

REMEMBER! Save all First Class emails etc if you do not all the information will be lost.

Todays Task :
Create a program that stores 20 numbers in a Listbox then input them into a array before displaying them on the screen.

My Design:

Pseudocode:
main steps

1/ Set up variables
2/ Get and store 20 numbers from listbox
3/Display Numbers
4/End Program

Refinements:
2.1/For 1 to 20
2.2/store number
2.3/Next

Here is Mr Stratton’s Awesome Program From Today
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

REMEMBER! Arrays Are Always Passed ByReferance

and Remember!
Homework:
For Tuesday the Multiple Choice sheet.
The end