vba 如何在 Excel 中设置单选按钮?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/267668/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I set up radio buttons in Excel?
提问by Peter Kelley
I want to use Excel to capture survey results. I want to have a large number of questions each with 5 radio buttons ranging from Excellent to Poor. Each radio button should correspond to a numerical value stored in a set of data cells somewhere (e.g Excellent = 13, Poor = 10, Good = 5 etc). I would like to be able to cut and paste these to assist in duplicating the controls for the large number of questions.
我想使用 Excel 来捕获调查结果。我想要大量的问题,每个问题有 5 个单选按钮,从优秀到差。每个单选按钮应对应于存储在某处的一组数据单元格中的数值(例如,优秀 = 13、较差 = 10、良好 = 5 等)。我希望能够剪切和粘贴这些以帮助复制大量问题的控件。
回答by Mark
You can go to View -> Toolbars -> Forms
您可以转到查看 -> 工具栏 ->表单
Then you should see the radio button which you can click on and add to your Excel sheet.
然后您应该会看到单选按钮,您可以单击该按钮并将其添加到您的 Excel 工作表中。
A good idea is to put down a "Group Box" first than add the Option Buttons to them. This way you can easily have many groups of questions.
一个好主意是先放下“分组框”,然后再向其中添加选项按钮。通过这种方式,您可以轻松获得多组问题。
You can also use the Excel CHOOSEfunction to set the values of the Option Buttons like you mentioned in your question...
您还可以使用 Excel CHOOSE函数来设置您在问题中提到的选项按钮的值...
See: herefor more details.
请参阅:此处了解更多详情。

