thirulovableenemy
New Member
- Joined
- May 31, 2012
- Messages
- 6
Hi Everyone
I have used/changed activex control listbox to form control list box but I can't able to perform some vba operations. Such as clear, list and add item and below is my code for activex listbox and I need to change it to form control list box. Name of the list box :List Box 45"
Please assist me
Thanks
Thiru
I have used/changed activex control listbox to form control list box but I can't able to perform some vba operations. Such as clear, list and add item and below is my code for activex listbox and I need to change it to form control list box. Name of the list box :List Box 45"
Please assist me
Code:
Public Sub CommandButton1_Click()
Sheets("ISIP").ListBox1.Clear
'Sheets("ISIP").ListBox2.Clear
'Sheets("ISIP").ListBox3.Clear
Sheets("ISIP").ListBox4.Clear
If ListBox2 <> "ALL" Then Range("Q31") = ""
If ListBox2 = "ALL" Then
Sheets("ISIP").Range("Q31") = "ALL"
If ListBox3 = "ALL" Then
For i = 2 To Sheets("2011").Range("A2").End(xlDown).Row
If Sheets("2011").Range("C" & i) = ListBox1.Text Then
Sheets("ISIP").ListBox1.AddItem Sheets("2011").Range("E" & i)
Sheets("ISIP").ListBox1.List(Sheets("ISIP").ListBox1.ListCount - 1, 1) = Sheets("2011").Range("T" & i)
Sheets("ISIP").ListBox1.List(Sheets("ISIP").ListBox1.ListCount - 1, 2) = Sheets("2011").Range("U" & i)
End If
Next i
End If
Thanks
Thiru
Last edited: