![]() |
|
#1
|
||||
|
||||
![]()
I think you only need one macro
Code:
Sub ColorDropDown() Dim sText As String, oFld As FormField With ActiveDocument If .ProtectionType <> wdNoProtection Then .Unprotect Password:="" For Each oFld In .FormFields Select Case oFld.Result Case "G" oFld.Range.Font.Color = wdColorBrightGreen oFld.Range.Shading.BackgroundPatternColor = wdColorBrightGreen Case "Y" oFld.Range.Font.Color = wdColorYellow oFld.Range.Shading.BackgroundPatternColor = wdColorYellow Case "R" oFld.Range.Font.Color = wdColorRed oFld.Range.Shading.BackgroundPatternColor = wdColorRed End Select Next oFld .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#2
|
|||
|
|||
![]()
Wow, it works! Also on the document I am working on. I can't thank you enough!
Another thing - the options change colors only after I run the macro which is not ideal for me. I will be sending this document to people (I am doing a psychological research) so I was wishing that the colors of the options would change while people are picking differnet options. I can't ask them to run a macro after they've made their decision. Is that even possible? |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
vba error method or data member not found in excel 2010 | Rose roon | Excel Programming | 0 | 09-08-2015 03:51 AM |
5941 requested member of collection does not exist Prevents Userform from Showing | marksm33 | Word VBA | 1 | 02-22-2014 08:56 AM |
Outlook 2010 problem (new member) | Cullers | Outlook | 0 | 01-21-2011 10:18 AM |
[PowerPoint 2010] Change font for all slides in an exist *.PPTX file | LongTTH | PowerPoint | 0 | 12-15-2010 02:07 AM |
![]() |
tatihulot | PowerPoint | 1 | 11-16-2010 08:35 AM |