title: How to loop through groupbox in vb.net
body: <p>In my VB.NET form I have 50 groupboxes, each containing a combobox named <code>volt</code>. I used this code to add value to all the comboboxes:</p>
  
  <pre><code>For count = 1 To 50
      Dim volt = DirectCast(Me.Controls("volt" &amp; count &amp; ""), ComboBox)
      volt.Items.Add("what a code")
  Next
  </code></pre>
  
  <p>but they were placed in different groupbox. When I rewrite it like this:</p>
  
  <pre><code>For count = 1 To 50
      Dim volt = DirectCast(groupbox1.Controls("volt" &amp; count &amp; ""), ComboBox)
      volt.Items.Add("what a code")
   Next
  </code></pre>
  
  <p>it works in in only groupbox1. How can I make affect the remaining groupboxes?</p>