可否再具体点?
提取index为i的caption属性值可以用
Label4(i).Caption

解决方案 »

  1.   

    比如有一个数组label1(i),里面的是“√”“×”,我现在想把label1(i)数组里caption值凡是“×”的选出来,我用代码
    if label1(i).caption="×"
    then...
    这样的语句不正确
      

  2.   

    你试试这样子For i = 0 To 3
        If label1(i).Caption = "×" Then
            MsgBox i
        End If
    Next请确认前后×的一致
    最好定义成常量
    public const strErr as string ="×"
    public const strOK as string ="√"
    然后后面都用这两个常量给caption赋值以及作为条件判断
      

  3.   

    for i=0 to 3 是什么意思阿?
      

  4.   

    你label1的下标的LBound UBound
      

  5.   

    是循环搜寻所有label1的数组内容啊, 你按你实际的修改过去就可以了
    如你有从0到10,那就for i=0 to 10 ....
      

  6.   

    你label1的下标的LBound UBound?
      

  7.   

    For b = 0 To UBound(Label5(a))
    If Label5(b).Caption = "×" Then
    end if
    next b
    也不对说我没有数组
      

  8.   

    我的意思是, 用1循环, 来找符合要求得caption,
    至于最大有多少,你自己应该知道的吧, 比如100 , 那就for i=0 to 100 了
    另外 控件组 , ubound不认的
      

  9.   

    dim lbl as lable
    for each lbl in label5
     if lbl.caption="x" then
     else
     end if
    next lbl