Hi all,
My son is doing Visual Basic at school. Unfortunately they are using Visual Basic 6 which doesn't seem that up to date. I know PHP but am floundering with this as can't seem to find what I'm looking for although I know what sort of thing I'm looking for.
He's been given the task of creating a form that takes 5 integers and then does some other stuff with it. I'm guessing arrays here. Have been managing to work out some of it. Can get it to take the range of numbers but only ever prints out the last item in the array. Am sure it's something very simple and if someone could point out the error I'd appreciate it.
Thanks in advance.
My son is doing Visual Basic at school. Unfortunately they are using Visual Basic 6 which doesn't seem that up to date. I know PHP but am floundering with this as can't seem to find what I'm looking for although I know what sort of thing I'm looking for.
He's been given the task of creating a form that takes 5 integers and then does some other stuff with it. I'm guessing arrays here. Have been managing to work out some of it. Can get it to take the range of numbers but only ever prints out the last item in the array. Am sure it's something very simple and if someone could point out the error I'd appreciate it.
Thanks in advance.
Code:
Private Sub Form_Activate()
Dim scores(5) As Integer
Dim numbers As Integer
For numbers = 1 To 5
scores(numbers) = InputBox("enter the scores")
Next numbers
List1.Items.Add scores(numbers)
End Sub