Public Sub firstprocedure() Dim pcount As Integer Dim grade() As Integer 'we can specify lenth with grade(5), we can specify with Redim Preserve grade() later Dim i As Integer
i = InputBox("pls input number of student:") ReDim Preserve grade(i) 'define array'length
For i = 1 To i
grade(i) = InputBox("pls input grade")
Next
End Sub
|