radio button to change/generate text

J

jlute

I have a form with a radio button group that has 2 buttons. I'd like
to be able to either change or generate text in the header depending
on which button is selected. For example if the "Permanent" radio
button is selected I want "Permanent Spec Change" to appear in the
form's header. If the "Temporary" radio button is selected I want
"Temporary Spec Change" to appear in the form's header.

Is this possible? If so, how?

THANKS!!!
 
F

fumei via OfficeKB.com

Yes, it most certainly is possible.

How?

If they are grouped, then only one can be ON. That is, if "Permanent" is ON
(True), then "Temporary" must be OFF (False).

You do not state WHICH header.....but let's make it Section 1, and you do not
have an DifferentFirstPage, or DifferentOddEven. It makes a...hmmmm....
difference if you DO have these.

If Permanent then
ActiveDocument.Sections(1).Headers(1).Range _
.Text = "Permanent Spec Change"
Else
ActiveDocument.Sections(1).Headers(1).Range _
.Text = "Temporary Spec Change"
End If
 
J

jlute

Well, THANK YOU!

Which header would be the the only header as it's a one page document
that has a header in case it expands into multiple pages depending on
the amount of info is inputted.

OK - I'm more of an Access person and am totally lost. Where do I put
this code? Somewhere in the radio button properties...?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top