I am working on a VBA form in Excel 2011. I have several check boxes on my form that I am trying to assign a value. Thus if the box is true, I want it to be = to 1 so I can add it in my formula. Here is the code I have on my calculate button at this point:
If chkPatientSafety.Value = True Then
chkPatientSafety.Value = "1"
chkPatientSafety.Value = "0"
txtTotal = Val(cboRegulatory) + Val(chkPatientSafety)
The Val(cboRegulatory) works perfect. I set the value in a list in my lookup list in my code and it applies the values no problem. But I have an issue somewhere with my chkPatientSafety not receiving a 1 or 0 for its value so it will properly add in my txtTotal formula. What am I doing wrong on assigning my check boxes a value? I was thinking true = 1 and false = 0 by default on a check box. But when it runs I get true or false not numerical. New at this form and any help would be appreciated.