在VBA窗体当中批量复选框某一复
首先,你应当把所有的CheckBox弄成控件数组,然后循环检查哪一个被选中,就好了privatesubCommandButton1_Click()DimIaslong,Caslong,CCaslongc=checkbox。 countfori=checkbox。lboundtocheckbox。uboundifcheckbox。item(i)。value=1thencc=cc+1nextifcc=cthen全选了else有没选的endifendsub 。
首先,你应当把所有的CheckBox弄成控件数组,然后循环检查哪一个被选中,就好了privatesubCommandButton1_Click()DimIaslong,Caslong,CCaslongc=checkbox。
countfori=checkbox。lboundtocheckbox。uboundifcheckbox。item(i)。value=1thencc=cc+1nextifcc=cthen全选了else有没选的endifendsub 。
收起