启用和禁用复选框 [英] Enable and disable checkbox

查看:83
本文介绍了启用和禁用复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表格中有10个复选框。其中我应该只能选择2个复选框。选中2复选框后,应禁用其余复选框。选择了哪些复选框,这些复选框应该从不同的Excel工作表中获取数据并将其放在下面设计的2帧中。(每个框架都包含更多复选框。但是当我选中复选框时,我遇到了问题。


请帮我开发这个。



谢谢

Hi,I have say 10 checkbox in my form. In which i should be able to select only 2 checkboxes. Once 2 checkbox are selected then the remaining checkboxes should be disabled. And which ever checkboxes are selected, those checkboxes should fetch the data from the different excel sheets and place it in the 2 frames which are designed below.(Each frames consists of some more checkbox. But i am facing the issue when the checkbox are checked.

Please help me developing this.


Thanks

推荐答案

当选择其中两个时,此代码将禁用复选框。

当未选中其中一个时:所有复选框都可用。

This code will disable the checkboxes when 2 of them are selected.
When one of the selected is unchecked: all the checkboxes are again available.

展开 | 选择 | Wrap | 行号


这是一个更简单的版本。要试用它,请创建一个新表单并在其上放置一系列复选框。然后将此代码粘贴到表单的代码区域中。 (控制数组使您的代码更短更简单。)
Here''s a simpler version. To try it out, create a new form and put an array of checkboxes on it. Then paste this code into the code area of the form. (Control arrays make your code much shorter and simpler.)
展开 | 选择 | Wrap < span class =codeDivider> | 行号


非常感谢。这有助于我解决复选框问题。但我的另一个问题是,一旦选中2个复选框,我应该只获得在这10个复选框下面的框中选中的复选框的数据。


例如:说10个复选框是名称水果,一旦我选择2个复选框,我应该得到不同表格中的数据。


请帮助我。我有2个框架,其中有复选框。
Thanks alot. This helped me solving the checkbox issue. But my other issue is that, Once 2 checkboxes are select i should get only data of the checkboxes selected in the frames below those 10 checkboxes.

For Example:Say 10 checkboxes are the name of the fruits, once i select 2 checkboxes i should get the data present in different sheet.

Please help me with this. And i have 2 frames in which there are checkboxes.


这篇关于启用和禁用复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆