Hi!
Can somebody please help me out for my class project?
I'm trying to run a loop that accept strings. Each string contains a last name, first name and a trest grade, supposedly separated by commas. After the strings had been accepted, the text box should show something like First name Last name score.
Somehow my loop doesn't work and the strings aren't show up in the text box after I input them into the inputboxes.
Can somebody help me please?
Thanks!
That's the code that I have so far:
Dim inputfn, inputln, inputgrade, result As String
Dim items() As String
Dim sum As Double = 0
Dim ctr As Integer = 0
Dim max As Integer
Do While sum <= max
inputfn = InputBox("Enter First Name:")
inputln = InputBox("Enter Last Name:")
inputgrade = InputBox("Enter Test Grade:")
items = inputfn.Split(",")
txtinput.Text = inputfn & vbTab & inputln & vbTab & inputgrade
For ctr = 0 To items.GetUpperBound(0)
sum = sum + (items(ctr))
Next
Loop
MsgBox("The sum of the test grades is " & sum & " and the average is " & sum / 2 & ".")