Drop down field no longer active after I unprotect document.

M

mlv-Oklahoma

I have a form document previously created by Macro where threre are drop down
options when you come a cross a active area. Once I unprotect the document to
modify, I can't seem to turn back the macro back on to get back where drop
down options become active. Instead, drop down field option dialog box comes
up. Any thought what I am doing wrong?

Thanks in advance
 
D

Doug Robbins - Word MVP

You need to reprotect the document for the formfields to work.

--
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
 
A

Armey

Yes, Doug is correct. Here is a little more info in the form of an
example that will hopefully help you. Also, if you password protect
your template you will have to incorporate that into you vba code as
well.

Cheers!



Sub MySubforDD()

With ActiveDocument
..Unprotect
Select Case Selection.FormFields(1).Result
Case "My Item 1"
Selection.Tables(1).Cell(1, 3).Shading.BackgroundPatternColor
= wdColorRed
Case "My Item 2"
Selection.Tables(1).Cell(1, 3).Shading.BackgroundPatternColor
= wdColorOrange
Case Else
Selection.Tables(1).Cell(1, 3).Shading.BackgroundPatternColor
= wdColorWhite
End Select
..Protect wdAllowOnlyFormFields, NoReset
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top