title: Referencing an object using a variable string in Visual Basic 2010
body: <p>I have several sets of similar objects (labels, progress bars) on a form in <strong>Visual Basic 2010 on Windows</strong>.  In my code, I have collections that contain data, which needs to be pushed into the value/text property of each.  </p>
  
  <p>I would like to get a solution similar to PHP in that I can assign values somewhat like: </p>
  
  <p><code>For ID as Integer from 0 to count(collectionExample)
  lblExample{ID}.Text=collectionExample(variableID)</code></p>
  
  <p>...and as such to loop through so each of the different lblExample's were updated to their corresponding value.  </p>
  
  <p>The issue I have come to is that I cannot seem to reference an object on the form using a variable.  I have also tried using something like </p>
  
  <p><code>CallByName("lblExample" + variableID, "Text", CallType.Set, exampleCollection(variableID))</code>... however I still can't combine the string and variable to reference the object.  </p>
  
  <p><strong>Any solutions on referring to objects in VB2010 by combining a string prefix and a variable string identifier, similar to PHP's $variable{$variable} approach?</strong></p>
  
  <p><em>Edit: Windows Platform</em></p>