Wednesday, January 13, 2016

How to Add Item to ListBox in VBA (2)

Add item from RowSource


Items want to add

With Listbox properties : RowSource



When we change data in Range("A1:A10"),

1
2
3
4
5
Private Sub CommandButton1_Click()

Range("A5") = "DataChange"              'change data

End Sub

and data in listbox also change



1
2
3
4
5
Private Sub CommandButton2_Click()

ListBox1.RowSource = "Sheet1!B1:B10"    'change data

End Sub


Download File

Before (1)
Next (3)

No comments :

Post a Comment