新手请教 一个form中有多个控件,有text,command,combobox等。其中40个combobox中通过下拉(a,b,c和d)选择,并且没有使用combobox数组。请教大侠:怎样统计这40个combobox中的内容为“b”的combobox的个数? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://zhidao.baidu.com/question/375602184.html?fr=fd dim oCtl as control dim Nums as long for each octl in me.controls if typename(octl)="ComboBox" then if octl.text="b" then nums=nums+1 end if next msgbox nums 添加一click事件,输入以下代码就行:dim a as control dim s as long for each a in me.controls if typename(al)="ComboBox" then if al.text="b" then s=s+1 end if next print s 就是遍历整个窗口的控件,判断是否是combobox控件,是的话判断它的值是否是b,是就加1 关于VB程序运行的问题,紧急求助啊!! 请问如何知道picturebox中某个像素点是颜色的R,G,B值?谢谢,盼高手解答 急需一个vb的com组件 但不会创建 请高手帮忙 [求助]关于图形浏览的问题,在线等待 RichTextBox 的问题 关于ADO 的基本问题 vb连接ORACLE,对于日期字段怎样处理,实现我INSERT INTO???? VB文件保存 vb6与vb.net到底有何区别哦?是不是VB6要被替代了?大家都来灌水呀 借问如何得到DBGRID某一CELL的位置(TOP,LEFT,WIDTH, HEIGHT)? 下标越界,谁帮我看下 winsock创建客户与服务器问题
dim Nums as long
for each octl in me.controls
if typename(octl)="ComboBox" then
if octl.text="b" then nums=nums+1
end if
next
msgbox nums
dim a as control
dim s as long
for each a in me.controls
if typename(al)="ComboBox" then
if al.text="b" then s=s+1
end if
next
print s