A: 

Put it in a loop, including the new statement but varing the position.

You could also clone the object, maybe with performance penalties ... Sorry but don't know Vb.net, I will give you the c# code hoping it will be similar. I think this it is not the best solution for your case (a loop will do the trick), but maybe it will be for someone with a similar but more generic problem.

CheckBox CB2 = (CheckBox)CloneObject(CheckBox1);

//change the location here... Form1.Controls.Add(checkBoxCB2 )

private object CloneObject(object o)
{
   Type t = o.GetType();
   PropertyInfo[] properties = t.GetProperties();

   Object p = t.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, null, o, null);

   foreach(PropertyInfo pi in properties)
      {
         if(pi.CanWrite)
           {
              pi.SetValue(p, pi.GetValue(o, null), null);
           }
      }

   return p;
}
Jonathan
+2  A: 

It seems like the only items that are different and not calculated between the CheckBox instances is the text. If so then you could just use the following code to add a set of CheckBox instances based off of a list of String's.

Dim data as String() = New String() { "testing", "testing2" }
Dim offset = 10
For Each cur in data 
  Dim checkBox = new CheckBox()
  Form1.Controls.Add(checkBox)
  checkBox.Location = New Point(offset, 10)
  checkBox.Text = cur
  checkBox.Checked = True
  checkBox.Size = New Size(100, 20)
  offset = offset + 30
Next
JaredPar
Thats what i am looking for, however, it only loops once in your example when it should loop twice?
StealthRT
@StealthRT, it looks for every value in the `data` array.
JaredPar
Correct, and it does say that data = 2 but it only has one checkbox on the form (testing) when it should have 2?
StealthRT
@StealthRT its likely the second checkbox is off the screen or just hidden below hthe other one. Try changing the offset values or making the form bigger to see the other check boxes.
JaredPar
Ah yes, i didnt have a big enough number (i set it to 50 the first time. Now 150 and it shows up). Thanks!
StealthRT