Thanks in advance anyways. With enough trial and error, I think I got it.
Case "MO" ActiveDocument.Unprotect Password:="password" ActiveDocument.Bookmarks("LLStatesVehicle").Range.Fields(1).Result.Text = "Text larger the 256 characters" ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="password" "Skrewdriver1979" wrote:
[Quoted Text] > Sub OnExitLLStates() > Select Case ActiveDocument.FormFields("State").Result > Case "OH" > ActiveDocument.Unprotect > > ActiveDocument.Bookmarks("LLStatesVehicle").Range.Fields(1).Result.Text = > "(Text larger then 265 characters)" > ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True > Case "MO" > ActiveDocument.Unprotect > > ActiveDocument.Bookmarks("LLStatesVehicle").Range.Fields(1).Result.Text = > "(Text larger then 265 characters)" > ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True > > Case "OH" or "MO" is a dropdown located in Section 1 of the document > > The text that is changed by selecting "OH" or "MO" is located in Section 7 > of the form. > > However, when I 'Protect Document' and tab out of the dropdown, I get the > following popup. > > Microsoft Visual Basic > The password is incorrect > > I have attempted to uncheck Section 7 in the 'Selection Sections...' however > the error still occurs. > > The reason I am using 'Protect Document' instead of just locking the form is > there is a section that is 100% open to edit. > > How can I or can I fix this error and still have the dropdown edit the text > field
|