![]() |
#1
|
|||
|
|||
![]()
I'm a total novice when it comes to VBA. I found the following code on another forum and copied it in order to program a command button to reset form fields on a Word document that is protected. The text boxes and drop downs are resetting properly but the checkboxes are not becoming unchecked while protection is on. However, if I stop protection and click the command button, the check boxes become unchecked. How can I get this to work when the document is protected?
![]() Private Sub CommandButton1_Click() Dim oFF As FormField For Each oFF In ActiveDocument.Range.FormFields Select Case oFF.Type Case Is = wdFieldFormTextInput oFF.Result = "" Case Is = wdFieldFormDropDown oFF.DropDown.Value = 1 Case Is = wdFieldFormCheckBox oFF.Result = False End Select Next oFF End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Andrew H | Word VBA | 7 | 11-26-2012 01:08 PM |
Checkbox in word document | ubns | Word | 1 | 07-10-2012 09:03 PM |
Using bookmarks in a protected document | Bill Stemp | Word | 0 | 10-16-2010 06:47 AM |
Problems working in a partially protected document | Autumn | Excel | 0 | 02-11-2009 03:46 PM |
Excel ->VB code for Checkbox (control toolbox) | kirkstyle | Excel | 0 | 08-16-2006 04:17 PM |