i removed the module as its not required.... here goes
Code:
Option Explicit
Dim Element As Integer
Private NameArray() As String
Private MarkArray() As Integer
Private Sub cmdAddRecord_Click()
'~~~ Checking. This should be done first !
If Val(txtStudentMark.Text) <= 0 Then
MsgBox "student mark cannot be less than zero. Please re-enter it"
Exit Sub
ElseIf Val(txtStudentMark.Text) > 100 Then
MsgBox "student mark cannot be greater than 100. Please re-enter it"
Exit Sub
End If
NameArray().StudentName = txtStudentName.Text
MarkArray().StudentMark = txtStudentMark.Text
lstNames.AddItem txtStudentName.Text
lstMarks.AddItem txtStudentMark.Text
End Sub
that doesnt work, i receive an "invalid qualifer" error message...
im confused with how to get assign the array to "txtstudent and txtmark.text" any ideas?? is that my error??