title: Populate multiple comboboxes based on name and for loop, VB.Net
body: <p>I am currently working in visual studio express 2013 with vb.net. I have 5 combo boxes that all have the same items that needed to be added into them. The names of the combobox are CBWeekday1, Cbweekday2,....CBweekday5. I want to use a loop statement to fill the boxes with the same data rather than have to use a line for every item for every combobox. However, I am receiving an error code and I think I have this set up wrong.</p>
  
  <pre><code>   Dim n As Integer = 1
      For n = 1 To 5
          Dim cb = DirectCast(Me.Controls("CBWeekday" &amp; n &amp;), ComboBox)
          ComboBox.Items.add("Monday")
          ComboBox.Items.add("Tuesday")
          ComboBox.Items.add("Wednesday")
          ComboBox.Items.add("Thursday")
          ComboBox.Items.add("Friday")
      Next
  </code></pre>