Checkbox and StartIndex Error

  • Thread starter Thread starter ashehu
  • Start date Start date
A

ashehu

When trying to uncheck a checkbox with the following simple line of
code
CheckBox8.Checked = 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.
 
When trying to uncheck a checkbox with the following simple line of
code
CheckBox8.Checked = 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.
 
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_CheckChanged Event was causing the error by
trying to remove a character in a string at position "-1".
Thanks Again
Ammar
 
Back
Top