Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Radio button in Excell workbook

Posted on 2014-01-20
6
Medium Priority
?
466 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 31

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 800 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 800 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

604 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