Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- For Each tb In Controls.OfType(Of TextBox)()
- DataGridView1.Rows.Add(tb.Text)
- Next
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Dim tbs As New List(Of TextBox) From {TextBox1, TextBox2, TextBox3, TextBox4, TextBox5, TextBox6, TextBox7, TextBox8}
- For Each tb As TextBox In tbs
- DataGridView1.Rows.Add(tb.Text)
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement