View Single Post
  #5   Report Post  
Posted to microsoft.public.word.vba.general,microsoft.public.word.vba.userforms,microsoft.public.word.vba.beginners,microsoft.public.word.tables
TomorrowsMan
 
Posts: n/a
Default Tricky: Word Table Conditional Formatting

Sorry you have been having to lead me by the hand through this; I'm
just discovering how versatile VBA is when making user forms, and I'm
not versed in the language yet.

So, if I take a stab at it.....I would have:

Sub FieldHighlight()
Select case GrandTotal
Case Is 1
ActiveDocument.Bookmarks("Fair").Range.Bold = TRUE
ActiveDocument.Bookmarks("Fair").Range.BackgroundP atternColor =
wdColorBlue
Case Is 2
ActiveDocument.Bookmarks("Good").Range.Bold = TRUE
ActiveDocument.Bookmarks("Good").Range.BackgroundP atternColor =
wdColorBlue
Case Is 3
ActiveDocument.Bookmarks("Great").Range.Bold = TRUE
ActiveDocument.Bookmarks("Great").Range.Background PatternColor =
wdColorBlue
Case Is 4
ActiveDocument.Bookmarks("Excellent").Range.Bold = TRUE
ActiveDocument.Bookmarks("Excellent").Range.Backgr oundPatternColor =
wdColorBlue
End Sub

Is that close? Or am I missing a line selecting the GrandTotal
bookmark?

Thanks again a million times....I'm learning alot, but there's a lot to
learn. :-)

Chris