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.
If (TextBox8.Text <> "" And TextBox9.Text <> "") 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
TextBox8 is causing the problem.