ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   checkboxes (https://www.excelbanter.com/excel-programming/306341-checkboxes.html)

mark

checkboxes
 
checkboxes, when linked to cells, store either TRUE or
FALSE in them...

Boolean...

is it possible to set the default item stored to 1 and 0 ,
so that a PivotTable could work with the sums better?

I can run through and change the TRUE/FALSE to 1/0 if I
need to, but it will just take extra time.

Thanks.

cmart02[_2_]

checkboxes
 
The default value is either true or false. You cannot have 1 AND 0 at the
same time as argumentos of a boolean control as it can only assume either one
state or the other.

Nigel

checkboxes
 
Not entirely true, since the triple state property allows the control to
take on a null value. Thus there are three valid values: null, true or
false.
I do not believe you can return a 0 or 1 from the control, however you can
set the value to 0 and 1 for true or false.

Cheers
Nigel

"cmart02" wrote in message
...
The default value is either true or false. You cannot have 1 AND 0 at the
same time as argumentos of a boolean control as it can only assume either

one
state or the other.




Nigel

checkboxes
 
I have discovered that if you multiply the value of the check box by -1 ,
then you get a 0 or 1 returned.
If you are saving the value to the worksheet, then use

Range("A1").Value = Checkbox1.Value * -1

Cheers
Nigel

"mark" wrote in message
...
checkboxes, when linked to cells, store either TRUE or
FALSE in them...

Boolean...

is it possible to set the default item stored to 1 and 0 ,
so that a PivotTable could work with the sums better?

I can run through and change the TRUE/FALSE to 1/0 if I
need to, but it will just take extra time.

Thanks.




mark

checkboxes
 
If you are saving the value to the worksheet, then use
Range("A1").Value = Checkbox1.Value * -1


looks like something along that line is what I'll have to
do, though I may just do it in a summarization
spreadsheet, instead of actually using the code in the
evaluation form that this is in.

thanks.
Mark


All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com