title: PowerShell - Incrementing Left Hand Variable
body: <p>Attempting to import .csv cell contents into a PowerShell Form Combo/Drop Down Box which works when I hard code in each variable number ($DropDownBox1.Text,  $DropDownBox2.Text etc.) but was looking to make it a bit smarter and loop through each instance and import appropriately.</p>
  
  <p>Is it possible to modify the left hand assignment to get it to increment accordingly?</p>
  
  <pre><code>$i=0
  $x=1
  Foreach($User in $ISDept)
  {
      $DropDownBox[$x].Text = Import-Csv -Path $File | Select-object -Index ($i) |% {$_.Status}
      $i++
      $x++
  }
  </code></pre>
  
  <p>Using the above code I get the error:</p>
  
  <p><strong>"Unable to index into an object of type System.Windows.Forms.ComboBox."</strong></p>
  
  <p>Thanks in advance.</p>