S
Stuart Peters
Based upon a checkbox value in the form fields I am trying to disable or
enable the remaining formfields in the table row.
I believe the following code should work. but I am gettting a run-time error
'5991' on the for each statement that says 'I cannot access individual rows
in this collection because the table has vertically merged cells'
Sub EnableActionFields()
' Enable or Disable the Actions formfields
Dim ffname As String
Dim ActField As FormField
ffname = Selection.FormFields(1).Name
For Each ActField In ActiveDocument.FormFields(ffname).Range.Rows(1)
If ActiveDocument.FormFields(ffname).CheckBox.Value = True Then
'Field checked - No action required
ActField.Enabled = False 'Already have info disable this action
Else
'Field Unchecked - Action is required
ActField.Enabled = True 'Need to assign Action,method, & dates
End If
Next
End Sub
Any ideas for a work around?
Thanks,
Stuart
enable the remaining formfields in the table row.
I believe the following code should work. but I am gettting a run-time error
'5991' on the for each statement that says 'I cannot access individual rows
in this collection because the table has vertically merged cells'
Sub EnableActionFields()
' Enable or Disable the Actions formfields
Dim ffname As String
Dim ActField As FormField
ffname = Selection.FormFields(1).Name
For Each ActField In ActiveDocument.FormFields(ffname).Range.Rows(1)
If ActiveDocument.FormFields(ffname).CheckBox.Value = True Then
'Field checked - No action required
ActField.Enabled = False 'Already have info disable this action
Else
'Field Unchecked - Action is required
ActField.Enabled = True 'Need to assign Action,method, & dates
End If
Next
End Sub
Any ideas for a work around?
Thanks,
Stuart