I'm trying to link two checkboxes together, like so in the image below. For example, when I hit the first checkbox and then, the second checkbox, the cell value should be 17.64. Then when I hit the second checkbox and then the first, the cell value should still be 17.64. However for some reason, the cell value sets itself to 7.53 when doing the second way. Here is what I am attempting to do.
The first checkbox on its own gives this value:
The first, then the second should give this value:
The second, then first should also give the same value as above, but does not:
Here is the code for both checkboxes. Any help would be greatly appreciated.
The first checkbox (top):
The second checkbox (bottom):
The first checkbox on its own gives this value:
The first, then the second should give this value:
The second, then first should also give the same value as above, but does not:
Here is the code for both checkboxes. Any help would be greatly appreciated.
The first checkbox (top):
VBA Code:
If CheckBox22.Value = True And CheckBox17.Value = True Then
Range("I14").Value = IIf(Me.CheckBox22, "15.06", "")
ElseIf CheckBox22.Value = True Then
Range("I14").Value = IIf(Me.CheckBox22, "7.53", "")
ElseIf CheckBox22.Value = True And CheckBox23.Value = True Then
Range("I14").Value = IIf(Me.CheckBox22, "17.64", "")
End If
The second checkbox (bottom):
VBA Code:
If CheckBox23.Value = True And CheckBox22.Value = True Then
Range("I14").Value = IIf(Me.CheckBox23, "17.64", "")
End If