In the userform, a name must be selected in the txtOcc, last 4 number entered in txtSSN and at least 1 checkbox must be checked. If any these items mention complied with, the "Print" Button should be disabled.
I manage to accomplish txtOcc, txtSSN, & Form 2106 ckbox. Unfortunately I can't seem to get the other checkboxes to work. Currently, if txtOcc or txtSSN is completed and I check either of the remaining checkbox, it enables the the "Print Button".
for example, select Name1, leave txtSSN blank, then check Vehicle Expense. The "Print" button gets enabled when it not suppose to since txtSSN is empty.
Function ChkVal()
Dim a&, b&, c&, d&, e&, f&, x&
a = 1 * (txtOcc <> "")
b = 1 * (txtSSN <> "")
c = 4 * ck2106
d = 4 * ckMER
e = 4 * ckEER
f = 4 * ckVER
x = a + b + c + d + e + f
If x Mod 4 = 0 Then
Ent1.Enabled = False
Else
If x <= -6 And x Mod 2 = 0 Then
Ent1.Enabled = True
Else
Ent1.Enabled = False
End If
End If
End Function
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.