Hi,
I am not a VB developer.Please explain me in simple words if any one can help me that would be of a great help to me.
I was working on Formfields in word 2003.
I thought of keeping a clear button to clear the fields once we fill the form.
I have used the following codes to clear:
-----------------------------------------------
Private Sub ClearFields()
ActiveDocument.Unprotect
ActiveDocument.Protect (wdAllowOnlyFormFields)
End Sub
And
Sub ClearForm()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
For i = 1 To oFld.Count
If oFld(i).Type = wdFieldFormDropDown Then
oFld(i).Result = " "
Else
oFld(i).Result = ""
End If
Next
End Sub
----------------------------------------------------
But in one of the sections of the word I have recorded few macros which will change the path and navigation of the form fields.
I want the Tab to go column wise instead of row wise in a section so I have created few macros.
----------------------------------------------------------------
Eg:
Sub Checkbox()
'
'
Set addchk = ActiveDocument.FormFields("Check8").CheckBox
If addchk.Value = True Then
ActiveDocument.Bookmarks("Text20").Select
End If
End Sub
----------------------------------------------------------------
The problem came when I kept the clear button.(I don,t know exactly)
The tab was going correctly when i created the macros to go as I desired before the clear button.
When I have placed the clear button the tab is not stopping at the Text20 formfield instead it is going to the next field i.e. Text21.
In this way for all the macros I created ,when I press the tab the cursor is jumping from desired field to the next available field.
Please let me know what should I do to avoid this.
I don't know why the behavior is like this.I am not a developer either.
Please help me.
Thanks,
Russel.
Russel is offline Reply With Quote
Bookmarks