You can only place the radio button captions to the left or right of the
option indicator. The Alignment property does that.

When you have placed the labels (with caption) above the option button, you
can use some code like -

Private Sub OptionButton1_Enter()
    Label2.BorderStyle = fmBorderStyleSingle
End Sub
Private Sub OptionButton1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Label2.BorderStyle = fmBorderStyleNone
    Cancel = False
End Sub
Private Sub OptionButton2_Enter()
    Label3.BorderStyle = fmBorderStyleSingle
End Sub
Private Sub OptionButton2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Label3.BorderStyle = fmBorderStyleNone
    Cancel = False
End Sub

- to indicate which radio button is currently selected...

In the code above label2 and label3 are the caption labels above the radio
buttons.

Regards

Ajit


-----Original Message-----
From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com]
On Behalf Of Yptrumpet
Sent: Monday, August 03, 2009 8:13 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ Re: Query concerning Option/Radio Buttons and
their captions


Anyone out there? Help please! I'm sure it's a simple question...

On Jul 30, 12:56 pm, Yptrumpet <ivanjonasgo...@gmail.com> wrote:
> Hello, everyone. This is my first post. I've looked high and low for
> an answer to this problem.
>
> I'm making a form in Excel to easily input data. I want to operate it
> with the keyboard as much as possible. There is a section of my form
> with four radio buttons. I want the captions above the buttons, so I
> simply removed the captions and placed four labels above the buttons.
>
> Now, when you tab through text boxes and buttons, it is clear which is
> the active control. With the radio buttons, on the other hand, it is
> not. It is very strange. On web pages, the button itself is
> encompassed with the dotted selection rectangle, but in VBA the
> caption is highlighted.
>
> THEREFORE, these are my questions:
> 1. Is there a way to place radio button captions above (below, to the
> left of, etc...) the button? If so, problem solved.
> 2. Else, what solution do you recommend? I simply want to know which
> radio button is currently active while tabbing through them.
>
> I thought about making four *_Enter subroutines which make the labels
> bold or normal depending on which radio button is selected.




--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 5,200 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to