Change property value in checkboxes at runtime 
Author Message
 Change property value in checkboxes at runtime

Hi,

I am using VB5 Enterprise edition.  My form has a bunch of checkboxes.
Depending on certain condition users should not be allowed to uncheck
certain check boxes that they had checked before(Disabling the
checkboxes once they have been checked is not an option).  
However when I try to set the property CHECK1.VALUE = TRUE in the click
event for the check box, I get the error message "Invalid property
value" when the user unchecks the box.  Surprisingly, this works in the
Sheridan checkbox that was shipped with VB4(threed32.ocx).  Since MS has
stopped shipping Threed32.ocx with VB5, I have no other option but to
use the MS check box control.

Is there any kind of a workaround for this problem.  Can somebody point
me in the right direction?  Thanks in advance.

L.Kumar



Mon, 04 Sep 2000 03:00:00 GMT  
 Change property value in checkboxes at runtime

The Sheridan checkbox uses a Boolean value for the checkbox. VB's checkbox
can't do this because it has three different states.
Unchecked = 0
Checked = 1
Grayed = 2

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/

Quote:

>Hi,

>I am using VB5 Enterprise edition.  My form has a bunch of checkboxes.
>Depending on certain condition users should not be allowed to uncheck
>certain check boxes that they had checked before(Disabling the
>checkboxes once they have been checked is not an option).
>However when I try to set the property CHECK1.VALUE = TRUE in the click
>event for the check box, I get the error message "Invalid property
>value" when the user unchecks the box.  Surprisingly, this works in the
>Sheridan checkbox that was shipped with VB4(threed32.ocx).  Since MS has
>stopped shipping Threed32.ocx with VB5, I have no other option but to
>use the MS check box control.

>Is there any kind of a workaround for this problem.  Can somebody point
>me in the right direction?  Thanks in advance.

>L.Kumar



Mon, 04 Sep 2000 03:00:00 GMT  
 Change property value in checkboxes at runtime

Quote:

>The Sheridan checkbox uses a Boolean value for the checkbox. VB's checkbox
>can't do this because it has three different states.
>Unchecked = 0
=vbUnchecked
>Checked = 1
=vbChecked
>Grayed = 2
=vbGrayed

>--
>Ben Baird, MVP
>Microsoft SiteBuilder Network Level 2
>Visual Basic Thunder, v. 2.0
>http://www.{*filter*}highway.com/~psy/
>Common Controls Replacement Project, Official Member
> http://www.*-*-*.com/

Andre'

- Show quoted text -

Quote:

>>Hi,

>>I am using VB5 Enterprise edition.  My form has a bunch of checkboxes.
>>Depending on certain condition users should not be allowed to uncheck
>>certain check boxes that they had checked before(Disabling the
>>checkboxes once they have been checked is not an option).
>>However when I try to set the property CHECK1.VALUE = TRUE in the click
>>event for the check box, I get the error message "Invalid property
>>value" when the user unchecks the box.  Surprisingly, this works in the
>>Sheridan checkbox that was shipped with VB4(threed32.ocx).  Since MS has
>>stopped shipping Threed32.ocx with VB5, I have no other option but to
>>use the MS check box control.

>>Is there any kind of a workaround for this problem.  Can somebody point
>>me in the right direction?  Thanks in advance.

>>L.Kumar



Tue, 05 Sep 2000 03:00:00 GMT  
 Change property value in checkboxes at runtime

Quote:

>Hi,

>I am using VB5 Enterprise edition.  My form has a bunch of checkboxes.
>Depending on certain condition users should not be allowed to uncheck
>certain check boxes that they had checked before(Disabling the
>checkboxes once they have been checked is not an option).
>However when I try to set the property CHECK1.VALUE = TRUE in the click
>event for the check box, I get the error message "Invalid property
>value" when the user unchecks the box.

Checkbox Value property can have the value 0, 1 or 2
TRUE evaluates to -1, hence it don't fit.

JB



Tue, 05 Sep 2000 03:00:00 GMT  
 Change property value in checkboxes at runtime

The .value property in a checkbox is not a boolean; it expects a number.
Off the top of my head, I think it's 0=unchecked, 1=checked, and 2=greyed.


Quote:
> I am using VB5 Enterprise edition.  My form has a bunch of checkboxes.
> Depending on certain condition users should not be allowed to uncheck
> certain check boxes that they had checked before(Disabling the
> checkboxes once they have been checked is not an option).  
> However when I try to set the property CHECK1.VALUE = TRUE in the click
> event for the check box, I get the error message "Invalid property
> value" when the user unchecks the box.  Surprisingly, this works in the
> Sheridan checkbox that was shipped with VB4(threed32.ocx).  Since MS has
> stopped shipping Threed32.ocx with VB5, I have no other option but to
> use the MS check box control.



Wed, 06 Sep 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. change a checkbox value in vba

2. Change checkbox value

3. Changing checkbox value using bookmarks

4. Preventing a checkbox from changing its value

5. Changing Value of Checkbox Causes Click Event to Execute

6. Changing value of Checkbox or OptionButton without firing Click Event

7. Help with Runtime error 380 (Invalid property Value)

8. VB6 - Help on usercontrol -how do I get runtime to use User Enterred values for property

9. Property values -- How to get them by name at runtime

10. Invalid property value runtime error 380

11. Property values -- How to get them by name at runtime

12. Changing Fields Values at runtime - PLEASE!!!

 

 
Powered by phpBB® Forum Software