![]() ![]() |
|
快速找到选中的OptionButton | |
作者:佚名 文章来源:不详 点击数 更新时间:2008/5/24 20:04:21 文章录入:杜斌 责任编辑:杜斌 | |
|
|
OptionButton控件经常是作为控件数组存在的,要快速找到其中的哪一个被选中,可以使用下面的代码: '假设控件数组包含3个OptionButton控件 intSelected = Option(0).Value * 0 - Option(1).Value * 1 - Option(2).Value * 2 注意,因为第一个操作数总是0,所以上述代码可以精简如下: intSelected = -Option(1).Value - Option(2).Value * 2 |
|
![]() ![]() |