PC Review


Reply
Thread Tools Rate Thread

Checkbox and StartIndex Error

 
 
ashehu@gmail.com
Guest
Posts: n/a
 
      23rd Feb 2007
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.

 
Reply With Quote
 
 
 
 
Phill W.
Guest
Posts: n/a
 
      23rd Feb 2007
(E-Mail Removed) wrote:
> 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.


 
Reply With Quote
 
ashehu@gmail.com
Guest
Posts: n/a
 
      23rd Feb 2007
On Feb 23, 5:04 pm, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k>
wrote:
> ash...@gmail.com wrote:
> > 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.


Thanks. The Checkbox_CheckChanged Event was causing the error by
trying to remove a character in a string at position "-1".
Thanks Again
Ammar

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox error Beeyen Microsoft Access Forms 4 15th Apr 2009 04:02 AM
Checkbox Error Chris Stammers Microsoft Word Document Management 0 9th Apr 2008 01:59 PM
Checkbox Error =?Utf-8?B?V2VuZw==?= Microsoft Access VBA Modules 0 26th Sep 2007 04:34 PM
MSI startIndex parameter Abbas Microsoft Dot NET 0 14th May 2007 09:02 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 PM.