Checkbox and StartIndex Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ashehu@gmail.com

    #1

    Checkbox and StartIndex Error

    When trying to uncheck a checkbox with the following simple line of
    code
    CheckBox8.Check ed = False
    I get the following error
    StartIndex Cannot Be less tha Zero
    Parameter name: StartIndex
    Its a windows application. When the form loads, some of the checkboxes
    get checked based on a user selected. When another user is selected
    some checkboxes get checked the checked states get checked.
    Any help really appreciated.

  • Phill W.

    #2
    Re: Checkbox and StartIndex Error

    ashehu@gmail.co m wrote:
    When trying to uncheck a checkbox with the following simple line of
    code
    CheckBox8.Check ed = False
    I get the following error
    StartIndex Cannot Be less tha Zero
    Parameter name: StartIndex
    Then your "simple line of code" is causing lots of other, complicated
    lines of code to be run and one of /those/ is failing.

    Pop a few breakpoints in the code that runs when a Checkbox is
    checked/unchecked.

    HTH,
    Phill W.


    Comment

    • ashehu@gmail.com

      #3
      Re: Checkbox and StartIndex Error

      On Feb 23, 5:04 pm, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k>
      wrote:
      ash...@gmail.co m wrote:
      When trying to uncheck a checkbox with the following simple line of
      code
      CheckBox8.Check ed = False
      I get the following error
      StartIndex Cannot Be less tha Zero
      Parameter name: StartIndex
      >
      Then your "simple line of code" is causing lots of other, complicated
      lines of code to be run and one of /those/ is failing.
      >
      Pop a few breakpoints in the code that runs when a Checkbox is
      checked/unchecked.
      >
      HTH,
      Phill W.
      Thanks. The Checkbox_CheckC hanged Event was causing the error by
      trying to remove a character in a string at position "-1".
      Thanks Again
      Ammar

      Comment

      Working...