' 例: Dim TextBoxs() As TextBox = {TextBox1, TextBox2, TextBox3, TextBox4, TextBox5} 'コントロール配列 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 4 TextBoxs(i).Text = "ここに入力" Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For i As Integer = 0 To 4 TextBoxs(i).Text = String.Empty Next End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim sum As Integer For i As Integer = 0 To 4 sum += CInt(TextBoxs(i).Text) Next i TextBox6.Text = sum End Sub