Not to sure which columns you want to be populated...
Have a look at this old upload of yours...The above one has to many weird things going on...
Private Sub cmdAdd_Click()
Dim lUnit As Long, tblrow
Dim Tbl As ListObject
Set Tbl = Sheets("Invoice Main").ListObjects("InvoiceMain")
lUnit = cboUnit.ListIndex
If Trim(Me.cboUnit.Value) = "" Then
MsgBox "Please enter a Unit ID"
Me.cboUnit.SetFocus
Exit Sub
End If
With Tbl
.ListRows.Add
tblrow = .ListRows.Count
.DataBodyRange(RowIndex:=tblrow, columnindex:=1).Resize(, 4) = Array(cboUnit, cboUnit.List(lUnit, 1), _
cboDescription, txtDate, txtAmt)
End With
cboUnit = ""
cboDescription = ""
txtDate.Value = Format(Date, "Medium Date")
txtAmt.Value = 1
cboUnit.SetFocus
End Sub
Bookmarks