Public Class Form1 Dim m, n, i, j As Integer Dim arr(20) As array1 [B] Structure array1 Public a()() As Array End Structure [/B] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button1.Enabled = True Button2.Enabled = True Button3.Enabled = True Button4.Enabled = True End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click m = InputBox("Number of Employee") n = InputBox("Number of Product") j = 0 For i = 1 To m - 1 Step 1 // error in this line as value of string type cannot be converted to system.array [B][U]arr(j).a(i)(0) = Val(TextBox1.Text)[/U][/B] 'MessageBox.Show(arr(j).a(i)(0)) Next i End Sub End Class[code=vb.net]
Public Class Form1
Dim m, n, i, j As Integer
Dim arr(20) As array1
Structure array1
Public a()() As Array
End Structure
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
m = InputBox("Number of Employee")
n = InputBox("Number of Product")
j = 0
For i = 1 To m - 1 Step 1
// error in this line as value of string type cannot be converted to system.array
arr(j).a(i)(0) = Val(TextBox1.Text)
'MessageBox.Show(arr(j).a(i)(0))
Next i
End Sub
End Class