Hi,
I'm fairly new to Excel VB. I have a userform and I want the user to input values into 3 boxes press an add button and then it adds it to a Listbox.
This is working fine for 1 line of data, but when I try to put a 2nd line of data it overwrites the first.
Here is the code I have at the moment:
Private Sub CommandButton1_Click()
With Me.ListView1
Me.ListView1.ColumnCount = 3
Me.ListView1.ColumnWidths = "80;82;75"
.AddItem
.List(0, 0) = txtEmployeeContribution
.List(0, 1) = txtCompanyContribution
.List(0, 2) = txtTotal
frmPID.txtTotal.Value = ""
frmPID.txtCompanyContribution.Value = ""
frmPID.txtEmployeeContribution.Value = ""
End With
End Sub
Can anybody help me with this.
Thanks
Bookmarks