M
MikeAllgood
I have an application where I am trying to enable/disable the controls in a
frame on a UserForm in VBA Office 2003. I have a checkbox in the frame and
when the checkbox is clicked, based on its value, I want to call one of two
subroutines. The subroutines have two arguments: the frame and the checkbox.
Whenever I try to run this code I get a type mismatch error. I know the
default property of the checkbox is the value property. Is it possible that
when I call the subs and reference the checkbox that it is trying to send a
boolean reference instead of a reference to the actual checkbox control? If
that is the case how do I get around this? If that isn't the problem, what
is, and how do I get it to work? The code is below. Thanks.
CheckBox clicked event:
Private Sub ckbTalentMod1_Click()
If ckbTalentMod1.Value = True Then
Call EnableObjects(fraTalentMod1, ckbTalentMod1)
Else
Call DisableObjects(fraTalentMod1, ckbTalentMod1)
End If
End Sub
Subroutine to enable the controls in the frame:
frame on a UserForm in VBA Office 2003. I have a checkbox in the frame and
when the checkbox is clicked, based on its value, I want to call one of two
subroutines. The subroutines have two arguments: the frame and the checkbox.
Whenever I try to run this code I get a type mismatch error. I know the
default property of the checkbox is the value property. Is it possible that
when I call the subs and reference the checkbox that it is trying to send a
boolean reference instead of a reference to the actual checkbox control? If
that is the case how do I get around this? If that isn't the problem, what
is, and how do I get it to work? The code is below. Thanks.
CheckBox clicked event:
Private Sub ckbTalentMod1_Click()
If ckbTalentMod1.Value = True Then
Call EnableObjects(fraTalentMod1, ckbTalentMod1)
Else
Call DisableObjects(fraTalentMod1, ckbTalentMod1)
End If
End Sub
Subroutine to enable the controls in the frame: