Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Tim Doyle Tim Doyle is offline
external usenet poster
 
Posts: 1
Default change color of cell based upon form drop down selection

Is it possible to change the background color (or font) of a cell
conditionally based upon a selection made from a drop down box within another
cell of the same table?
  #2   Report Post  
Posted to microsoft.public.word.tables
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default change color of cell based upon form drop down selection

Tim.

Yes.

You create and assign a macro to run on exit from the formfield.

Let's say you have a dropdown with the values "Red" "Blue" and "Green."
The formfield has a bookmark name of "ColorPicker"

Sub OnExitDD()
ActiveDocument.Unprotect
Select Case ActiveDocument.FormFields("ColorPicker").Result
Case "Red"
ActiveDocument.Tables(1).Cell(?, ?).Range.Font.Color = wdColorRed
ActiveDocument.Tables(1).Cell(?,
?).Range.Shading.BackgroundPatternColor = wdColorDarkRed
Case "Blue"
'Like above except differenct colors
Case "Whatever"
'Like above
Case Else
'Do Nothing
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, True
End Sub


Tim Doyle wrote:
Is it possible to change the background color (or font) of a cell
conditionally based upon a selection made from a drop down box within another
cell of the same table?


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I disable change tracking when filling out form fields? kogaclan Microsoft Word Help 1 August 23rd 06 01:58 AM
How do I change formats in a Word form? trainer07 Microsoft Word Help 1 August 10th 06 03:33 PM
Having trouble with a Word based form. JodyH Microsoft Word Help 1 February 24th 05 05:12 PM
word table cell resize or word table cell size change or word table change cell size [email protected] Tables 0 January 13th 05 09:55 PM
Change cell height in one cell only in a table kat Tables 1 November 15th 04 12:26 AM


All times are GMT +1. The time now is 07:02 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"