I've just moved onto 2-D Arrays in my VB6 beginners book. I'm struggling to
get my head around the following problem but no doubt you will think it
rather easy.
My program is supposed to allow up to 20 students to enter their name and 3
exam marks, with each students details being entered into a 2-D Array upon
the click of a command button. There is also a list box and another command
button which will display the contents of the array. I have next to nothing
done but I'll post it anyway. Thank you.
Option Explicit
Dim Details(1 To 20, 1 To 3) As String
Dim Index As Integer
Private Sub cmdAddToArray_C lick()
Index = Index + 1
Details(Index, 1) = txtMark1.Text
Details(Index, 2) = txtMark2.Text
Details(Index, 3) = txtMark3.Text
End Sub
get my head around the following problem but no doubt you will think it
rather easy.
My program is supposed to allow up to 20 students to enter their name and 3
exam marks, with each students details being entered into a 2-D Array upon
the click of a command button. There is also a list box and another command
button which will display the contents of the array. I have next to nothing
done but I'll post it anyway. Thank you.
Option Explicit
Dim Details(1 To 20, 1 To 3) As String
Dim Index As Integer
Private Sub cmdAddToArray_C lick()
Index = Index + 1
Details(Index, 1) = txtMark1.Text
Details(Index, 2) = txtMark2.Text
Details(Index, 3) = txtMark3.Text
End Sub
Comment