title: TextBox: Index was outside the bounds of the Array
body: <p>In my visual studio form, anytime I want to call a function based on a certain TextBox change of input, it throws an exception that  "Index was outside the bounds of the array", even though my code doesn't use that input to access any array. </p>
  
  <pre><code>If (TextBox8.Text &lt;&gt; "" And TextBox9.Text &lt;&gt; "") Then
    If (ComboBox9.Text = "DC / Single Phase") Then
      voltageDrop = CInt(TextBox9.Text) * (2 * CInt(TextBox8.Text) * resLen(ComboBox8.SelectedIndex) / 1000)
    Else
      voltageDrop = 1.732 * CInt(TextBox9.Text) * (CInt(TextBox8.Text) * resLen(ComboBox8.SelectedIndex) / 1000)
    End If
    Label54.Text = CStr(voltageDrop)
  End If
  </code></pre>
  
  <p>TextBox8 is causing the problem.</p>