Log in

View Full Version : Populate ListBox from multiple TextBoxes



AndreaM
03-13-2017, 05:18 AM
Hi, I am trying to populate a ListBox with rows and columns from multiple TextBoxes on the same UserForm in Word. I have 3 TextBoxes on a Userform which I would like to fill in a ListBox when I click a Button. I would like the ListBox to add a new row everytime I click the Button to add the values from the TextBoxes.

mana
03-13-2017, 05:50 AM
Private Sub CommandButton1_Click()

With ListBox1
.AddItem ""
.List(.ListCount - 1, 0) = TextBox1.Text
.List(.ListCount - 1, 1) = TextBox2.Text
.List(.ListCount - 1, 2) = TextBox3.Text
End With

End Sub