Public Sub Maketxtbox()
txtnum = Convert.ToInt32(txttest.Text)
l = 30
For Me.i = 1 To txtnum
ntxt = 85 + (i * l) 'ตำแหน่งในแนวตั้ง
Dim mtxt As New TextBox
txtpo.Location = New Point(150, ntxt)
txtpo.Name = "txtpo" + i.ToString
Me.Controls.Add(mtxt)
Next
End Sub