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 / November 2006

Tip: Looking for answers? Try searching our database.

Clearing Checkboxes in Form using Macro (Protected Form)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ryan.mae.casey@gmail.com - 10 Nov 2006 22:21 GMT
Hi All,

I created a form and I have the macro to unprotect the document, clear
the "text" type fields & re-protect, however, the check boxes do not
clear.  This is what I'm currently using & it's working wonderfully on
the text fields, but no such luck with the check boxes.

Sub Clear()
With ActiveDocument
   .Unprotect Password:=""
   .Range.Fields.Update
   .Protect _
       Type:=wdAllowOnlyFormFields, _
       NoReset:=True, _
       Password:=""
End With
End Sub

Any help would be greatly appreciated!
Doug Robbins - Word MVP - 11 Nov 2006 00:57 GMT
All you need is

With ActiveDocument
   .UnProtect
   .Protect wdAllowOnlyFormFields
End With

That will clear everything.  Using NoReset = True prevents things from being
cleared.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi All,
>
[quoted text clipped - 15 lines]
>
> Any help would be greatly appreciated!
ryan.mae.casey@gmail.com - 13 Nov 2006 15:03 GMT
Silly me!!  Thanks so much for your help!!!

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.