Checkboxes on Userform -- Unable to Clear Checkmark in Checkbox

K

Keith

I have been looking for several days now, so I am coming to ask for
help. I have a userform that has 7 checkboxes, but many variations
run many different macros.

I am doing ok until I change the value of one of the checkboxes. When
I change the checkbox value to False, it runs the macros associated
with the Change event, BUT I am unable to get the checkmark in the
checkbox to clear.

Any ideas on what I am doing wrong?
------------------------------------------------------
I am on Word 2003, in a UserForm
-- Example Subroutine is listed below.


Sub CommandButtonResetForm_Change()
'
' Change Event for selecting/deselecting the "Reset Defaults" checkbox
' Macro recorded 1/28/2007 by ...
'
'Determine if the "Reset Defaults" checkbox is selected or deselected
on the change event.
'If CheckBoxResetForm.Value = True Then

'Reset the default roles on the Authorization to Move section.
'Application.Run MacroName:="Module3.ResetUserFormAuthorization"

'Enable all development checkboxes & Labels (in case they have
been disabled).
'ActiveDocument.FormFields("CheckBox2Dev").CheckBox.Value = True
CheckBox2Dev.Enabled = True
CheckBoxAmdocsDev.Enabled = True
CheckBoxETLDev.Enabled = True
CheckBoxMISDev.Enabled = True
CheckBoxRHDDBDev.Enabled = True
LabelETLtoDev2.Enabled = True
LabelETLtoFuncSpecAuth.Enabled = True
LabelMIStoDev2.Enabled = True
LabelDev2.Enabled = True

'Set all the checkbox values to False (unchecked).
FormField.CheckBox2Dev.Value = False
FormField.CheckBox2Movers.Value = False
FormField.CheckBoxAmdocsDev.Value = False
FormField.CheckBoxETLDev.Value = False
FormField.CheckBoxMISDev.Value = False
FormField.CheckBoxPL.Value = False
FormField.CheckBoxRHDDBDev.Value = False

End If

End Sub
 
K

Keith

Well, it would seem that writing out my question and reexamining my
code gave me the lightbulb.

I had changed the Subroutine so many times that it had broken segments
of code. I changed the button to a Click event and cleaned out the
open if statement as well as took formfield off of the statements,
and ... wallah!

Everything is working fine. I want to thank everyone for allowing me
to post. It did get me to my solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top