Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Need to update a Macro
If anyone can assist me with the following problem I would greatly
appreciate it! I am using a Word Template which contains various tables. One column in one of the tables contains a check box, which is associated with a Marco. The function of this Macro is to highlight the row when the check box is checked. Here is the Macro that I am currently using: Sub REDhighlightwhenchecked() ' ' REDhighlightwhenchecked Macro ' Macro created 9/14/2006 by Shannon Cook ' Dim ffname As String ffname = Selection.FormFields(1).Name With ActiveDocument .Unprotect If .FormFields(ffname).CheckBox.Value = True Then .Bookmarks(ffname).Range.Rows(1).Shading.Backgroun dPatternColor _ = wdColorRed Else .Bookmarks(ffname).Range.Rows(1).Shading.Backgroun dPatternColor _ = wdColorAutomatic End If .Protect wdAllowOnlyFormFields, NoReset End With End Sub Here is the current situation: I am in the process of altering the format of the template. Instead of having only one check box in the row, I will now have 6 check boxes in a single row. Each check box is associated with a different color. What I have found is that I need to alter the existing macro to have the check boxes be mutually exclusive, i.e. Each row can only have one check box checked at a time. Help! SCook |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Need to update a Macro
Hi ?B?U0Nvb2s=?=,
Here is the current situation: I am in the process of altering the format of the template. Instead of having only one check box in the row, I will now have 6 check boxes in a single row. Each check box is associated with a different color. What I have found is that I need to alter the existing macro to have the check boxes be mutually exclusive, i.e. Each row can only have one check box checked at a time. You'll find an article on this on the word.mvps.org website. Basically, the macro needs to run through all the form fields within a given range (the Row.Range in this case), make sure it's dealing with a checkbox, then set the value of the checkbox. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
One of my MAIN menu's is missing an item -- namely "FILE" | Microsoft Word Help | |||
Macro not working on other pc's | New Users | |||
Form Generaters in Word | Microsoft Word Help | |||
Creating a macro | Page Layout | |||
Possible bug when recording a Word Macro | Microsoft Word Help |