zoukankan      html  css  js  c++  java
  • vba中ListBox控件的使用

    给ListBox添加内容

    If CheckBox8 = True Then---------------------------checkbox控件被选中

        For i = 0 To ListBox1.ListCount - 1--------------循环将值赋到ListBox中
            If i < ListBox1.ListCount Then
        '        If ListBox1.Selected(i) Then
        '            ListBox1.RemoveItem (i) ---------------clear   selected row 删除选中内容
                    Me.ListBox1.Selected(i) = True----------Me只有在同一个页面的时候才用  sheet5.ListBox1.Selected(i) = True 适用所有情况。
        '            i = i - 1
        '        End If
            End If
        Next

    Else
        For i = 0 To ListBox1.ListCount - 1
            If i < ListBox1.ListCount Then
       
                    Me.ListBox1.Selected(i) = False
       
            End If
        Next
       
    End If

    通过调节ListBox属性调节ListBox多选或者单选ListSytle等改变内容的输出形式。

  • 相关阅读:
    3.24课堂
    3.23作业
    3.23课堂
    3.20作业
    3.20课堂
    3.19作业
    3.19课堂
    3.18课堂
    3.18作业
    46、表与表的连接
  • 原文地址:https://www.cnblogs.com/zigewb/p/3414519.html
Copyright © 2011-2022 走看看