The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!
Computer Tech Support
Dish Network Deals
 

To stop seeing these ads and get other benefits check This page!

Go Back   The Code Cage Forums > Newsgroups - Microsoft Topics > Newsgroup - Word Forum > Document Properties & Formatting

Custom Search
Translate this Page!
Chat In Use Now! Microsoft Office Chat Online now!


Document Properties & Formatting Post questions in this forum if they are related to using Microsoft Word Document Properties, Formatting, Functions etc.

Hey there!

It looks like you're enjoying but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. Register now!

Already a member? Login at the top of this page to stop seeing this message.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21st March 2010, 07:55 AM
Jeff Parker
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Displaying the label of the selected Option Button

------ Register to get rid of these "In Post" ads! ------


Hi, in Word 2003, how can I display elesewhere in the doc the label
associated with the radio/option button that the user has selected? Has this
something to do with Fields? I can't seem to work out how to do it. Any
thoughts please?
Reply to this post


Did you find this post helpful? Yes | No

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #2 (permalink)  
Old 21st March 2010, 09:00 AM
Graham Mayor
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Re: Displaying the label of the selected Option Button

------ Register to get rid of these "In Post" ads! ------


Can I suggest that you don't use activex controls in a document. They are
primarily intended for web page creation. Use instead check boxes - which
can emulate the action of radio buttons with the aid of macros. -
http://word.mvps.org/faqs/tblsfldsfm...FmFldChbxs.htm

However to answer the question asked, radio buttons work in groups. In the
case of two radio buttons with default names you can display that name with
a docvariable field - here {Docvariable varBtn} - and you can set the value
of that variable by using the macro code associated with the option button
eg

Option Explicit
Private oVars As Variables
Private Sub OptionButton1_Click()
Set oVars = ActiveDocument.Variables
If OptionButton1.Value = True Then
oVars("varBtn").Value = "OptionButton1 selected"
End If
ActiveDocument.Fields.Update
End Sub
Private Sub OptionButton2_Click()
Set oVars = ActiveDocument.Variables
If OptionButton2.Value = True Then
oVars("varBtn").Value = "OptionButton2 selected"
End If
ActiveDocument.Fields.Update
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"Jeff Parker" <JeffParker@discussions.microsoft.com> wrote in message
news:BD7BA2EF-6FD5-4DDE-8CBC-8F63699427DF@microsoft.com...
> Hi, in Word 2003, how can I display elesewhere in the doc the label
> associated with the radio/option button that the user has selected? Has
> this
> something to do with Fields? I can't seem to work out how to do it. Any
> thoughts please?



Reply to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
Reply

Bookmarks

Tags
button, displaying, label, option, selected


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



All times are GMT +1. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.5.0
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent