Solved

Radio button in Excell workbook

Posted on 2014-01-20
6
454 Views
Last Modified: 2014-01-20
I tested a MS workbook with several radio buttons.  After finishing tests, I want to delete the selection in the radio buttons, but I don't know how.  Anyone can help me on this?
0
Comment
Question by:jjxia2001
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:gowflow
ID: 39795209
what do you mean delete the selection in the radio button ? delete the button itself ?
not clear.
Can you post the workbook ?
gowflow
0
 

Author Comment

by:jjxia2001
ID: 39795253
Sorry, not delete the radio buttons, but not select any of the selections.  When users open the workbook, I don't want them to see any of selection has been checked in any radio buttons.  Hope this is clear.  If not, let me know.
0
 
LVL 12

Assisted Solution

by:Harry Lee
Harry Lee earned 200 total points
ID: 39795456
jjxia2001,

One of the radio button in a radio buttons group must be selected. That's why it is call radio buttons.

If you want to be able to clear the selection of a control object, you should use check boxes.

If you really need to clear the radio buttons, you will have to use VBA to clear them.

Use code like,
ActiveSheet.OptionButton1.value = False
ActiveSheet.OptionButton2.value = False
ActiveSheet.OptionButton3.value = False
ActiveSheet.OptionButton4.value = False

You will have to do it one by one.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:jjxia2001
ID: 39795481
I attach the workbook here.  For Security Exposures radio box(B30-F31), currently Middle Third is selected because I'm doing testing.  Now I want to send this workbook to users, so I want to un-select Middle Third.  But it seems the only way to un-select Middle Third is selecting another one (such as Higher Third ot Lower Third).  But I don't want anyone is selected when users open this workbook.  Thanks in advance.
CAG-WC-KE-02172014-01202014.xlsm
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 200 total points
ID: 39795491
jjxia2001,

Or you can use the following code to clear all of it at once.

Sub ClearRadioButtons()
Dim i As Long
    With ActiveSheet
        For i = 1 To .OLEObjects.Count
            If TypeName(.OLEObjects(i).Object) = "OptionButton" Then
                .OLEObjects(i).Object = False
            End If
        Next i
    End With
End Sub

Open in new window

0
 

Author Closing Comment

by:jjxia2001
ID: 39795512
Thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now