This my code in button click event. I want to add dynamic text boxes. It is focused to line no 7 and show "Object reference not set to an instance of an object."
Dim txtBx() As TextBox
Static x As Integer
Static i As Integer
x = x + 20
txtBx(i).Location = New Point(10, 10 + x) ''''Object reference not set to an instance of an object
txtBx(i).Size = New Size(100, 20)
i = i + 1
Me.Controls.Add(txtBx(i))
Please help me to correcting this problem.