Re: OptionButton Group question by Doug
Doug
Sun May 20 13:53:28 CDT 2007
I don't believe that you need do anything with the group name, it is either
the captions of the frames in which each group of option buttons would be
inserted, or some other label on your form whose attribute you want to set.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"Patrick C. Simonds" <ordnance1@comcast.net> wrote in message
news:ueTLDrwmHHA.3996@TK2MSFTNGP06.phx.gbl...
> Well I think I will (at least initially) do it as part of the UserForm
> Initialization, so is there any way to reference the GroupName? In this
> case the GroupNames will be Question1, Question2 and so on.
>
>
>
>
> "Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
> news:eRcNonwmHHA.960@TK2MSFTNGP03.phx.gbl...
>> It would have to be done by some external click event such as by a
>> command button because once you click on one option button, you can only
>> "unclick" it by clicking on another option button so that after one has
>> been clicked, one of them will always be true.
>>
>> The following run under some other event, a command button click for
>> example will however achieve what you want
>>
>> If OptionButton1.Value = False Then
>> If OptionButton2.Value = False Then
>> If OptionButton3.Value = Flase Then
>> Frame1.ForeColor = wdColorRed
>> Else
>> Frame1.ForeColor = wdColorAuto
>> End If
>> Else
>> Frame1.ForeColor = wdColorAuto
>> End If
>> Else
>> Frame1.ForeColor = wdColorAuto
>> End If
>>
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Patrick C. Simonds" <ordnance1@comcast.net> wrote in message
>> news:OwGDuawmHHA.4848@TK2MSFTNGP05.phx.gbl...
>>> On my UserForm I have a number of OptionButton groups and each group has
>>> a
>>> Label associated to it. This is a series of questions with 3 possible
>>> answers for each question.
>>>
>>> What I would like is some code which would change the color of the text
>>> in
>>> the label from black to red, if none of the 3 OptionButtons in the group
>>> is
>>> true. I am hoping this could be done by Option Group as opposed to
>>> writing a
>>> click event for each OptionButton.
>>>
>>
>>
>
>