I need to make a 2d array with the variable strStudents (it is for a class the project is a grading program) and I need to have it strStudent(Val(strStdAmt), 1000) for the array. Why can't I do this and how can I do this? :)
Printable View
I need to make a 2d array with the variable strStudents (it is for a class the project is a grading program) and I need to have it strStudent(Val(strStdAmt), 1000) for the array. Why can't I do this and how can I do this? :)
VB Code:
Dim strStudent() As String ReDim strStudent(Val(strStdAmt), 1000)
alright thanks.
that doesn't seem to work under general declarations it says invalid outside procedure
At least the Redim line needs to be in a Sub or Function.
[Highlight=VB]Option Explicit
Dim strStudent() As String
Private Sub Form_Load()
Dim strStdAmt As Long
strStdAmt = 1000
ReDim test(strStdAmt, 1000)
End Sub[/VBCDOE]
EDIT: I'm too slow