I have a UserForm that adds New Suppliers to a Table but I get an error [see title] at the line Set tbl = ws.ListObjects("Supplier")
The SheetName is correct and I have a Table called Supplier on that sheet
Any suggestions gratefully received
Many thanks
The SheetName is correct and I have a Table called Supplier on that sheet
Code:
Private Sub cmdAddSupplier_Click()
Dim ws As Worksheet
Set ws = Sheets("Lists")
Dim tbl As ListObject
Set tbl = ws.ListObjects("Supplier")
Dim newRow As ListRow
Set newRow = tbl.ListRows.Add
With newRow
.Range(1) = txtPayeeName
.Range(2) = cmbVATType
.Range(3) = cmbHeaders
End With
Unload Me
End Sub
Any suggestions gratefully received
Many thanks