#1   Report Post  
Posted to microsoft.public.word.docmanagement
SCook SCook is offline
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
One of my MAIN menu's is missing an item -- namely "FILE" George Loud Microsoft Word Help 4 August 26th 07 05:50 AM
Macro not working on other pc's akkrug New Users 15 August 22nd 06 01:07 PM
Form Generaters in Word Graham Beaumont Microsoft Word Help 2 May 17th 06 07:11 PM
Creating a macro dk Page Layout 10 November 17th 05 04:36 PM
Possible bug when recording a Word Macro Raven95 Microsoft Word Help 4 April 30th 05 09:49 PM


All times are GMT +1. The time now is 12:56 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"