Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2018, 02:05 PM
macropod's Avatar
macropod macropod is offline Help with Colour Coding drop downs. Windows 7 64bit Help with Colour Coding drop downs. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is no code in your latest attachment, either, so it is impossible for me to see what steps you've taken to implement the solution I pointed you to.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 03-15-2018, 03:40 PM
Instructionalhelp Instructionalhelp is offline Help with Colour Coding drop downs. Mac OS X Help with Colour Coding drop downs. Office 2016 for Mac
Novice
Help with Colour Coding drop downs.
 
Join Date: Mar 2018
Posts: 6
Instructionalhelp is on a distinguished road
Default

I have just checked the file I sent to you and I can see the macro and the code when I open it and go to the developer tab and macros.

Please see a copy and paste of what I see.


End Sub
Option Explicit
Dim i As Long

Private Sub Document_Open()
ActiveDocument.Bookmarks("ColourDropDown").Range.S elect
Call Index
End Sub

Sub Index()
i = Replace(Selection.FormFields(1).Range.Bookmarks(1) .Name, "ColourDropDown", "")
End Sub

Sub ColorDropDown()
Dim sText As String, oFld As FormField
With ActiveDocument
Set oFld = .FormFields("Dropdown" & i)
sText = oFld.Result
If .ProtectionType <> wdNoProtection Then .Unprotect Password:=""
With oFld.Range
Select Case sText
Case Is = "SOP UPDATE" 'green
.Font.Color = wdColorBrightGreen
.Shading.BackgroundPatternColor = wdColorBrightGreen
Case Is = "SAFETY NOTICE" 'yellow
.Font.Color = wdColorYellow
.Shading.BackgroundPatternColor = wdColorYellow
Case Is = "TRAINING UPDATE" 'pink
.Font.Color = wdColorRed
.Shading.BackgroundPatternColor = wdColorRed
Case Is = "ADVISORY BULLETIN" 'grey
.Font.Color = wdColorRed
.Shading.BackgroundPatternColor = wdColorRed
End Select
End With
.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End With
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Downs Suray1911 Excel 1 09-29-2015 10:31 PM
Help with Colour Coding drop downs. Excel 2013 Project Timeline - colour coding data labels MicrosoftNovice2015 Excel 1 09-15-2015 02:16 PM
Help with Colour Coding drop downs. field shading for drop downs rbd50 Mail Merge 3 03-31-2015 09:52 PM
Help with Colour Coding drop downs. Drop-Downs: Run Macro on Exit Andrew H Word VBA 15 11-16-2012 08:34 AM
Help with Colour Coding drop downs. Please help me with drop downs in Excel 2010 mhays Excel 6 01-16-2012 09:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft