How to control values passed by radio buttons

J

Jason Weiss

Hi,

I'm trying to debug a form that someone else did in Excel 2000. The issue
is the following: there is a set of radio buttons in a frame (or, in the
language of the controls, a set of option buttons in a group box). The
radio buttons are labeled 1-5. The "Cell link" field in the properties page
for all the radio buttons is set to the same cell on a different sheet. The
problem is, the value that appears in the linked cell when I click on any of
the radio buttons is not the value I want to have appear. The radio buttons
are numbered 1-5, but the values that appear are 6-10. How do I change
them?

BTW, the form was constructed using the Forms toolbar, *not* the Controls
toolbox.

Thanks to anyone who can help me!

....Jay
 
D

Dave Peterson

My first guess is you have some hidden option buttons on your worksheet.

Have your worksheet active
Hit Alt-F11 to get to the VBE
hit Ctrl-G to see the immediate window
type this in and hit enter:

ActiveSheet.OptionButtons.Visible = True

If you wanted to get a better idea where they were, you could use a little
macro:

Option Explicit
Sub testme()

Dim myOptBtn As OptionButton
Dim wks As Worksheet
Dim resp As Long

Set wks = ActiveSheet

For Each myOptBtn In wks.OptionButtons
If myOptBtn.Visible = False Then
resp = MsgBox(prompt:="Hidden button near: " _
& myOptBtn.TopLeftCell.Address(0, 0) _
& vbLf & "Unhide?", Buttons:=vbYesNo)
If resp = vbYes Then
myOptBtn.Visible = True
End If
End If
Next myOptBtn

End Sub
 

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

Similar Threads

radio buttons in XL2003 2
Excel Excel Radio Buttons 0
Radio buttons 1
Radio Buttons 3
Linking Radio Buttons for Test 3
Word Radio Buttons 0
Radio/Option Buttons on a Form in Word 1
Radio buttons 1

Top