Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Checkboxes on Userform  -- Unable to Clear Checkmark in Checkbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith - 31 Jan 2007 18:37 GMT
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
Keith - 31 Jan 2007 19:03 GMT
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.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.