Fill first row of a table

tigerdel

Board Regular
Joined
Oct 13, 2015
Messages
145
Office Version
  1. 365
Platform
  1. Windows
I have a sheet called Quotation with a table in it called Quotation
Through a UserForm [frmNewDocument] I add items to that table
Quotes ^0 Invoices.xlsm
ABCDEFG
17Product #CategoryItem DescriptionPriceUOMQuantityTotal Value
18
1910000008Cables10mm Round Clips£ 1.00each10£ 10.00
Quotation

The problem I have is that my code seems to ignore the first row, add a new row then enters the data
My code is:
Code:
Private Sub More_Yes()
Dim ws As Worksheet
Dim tbl As ListObject
Dim newRow As ListRow
Set ws = Sheets("Quotation")
Set tbl = ws.ListObjects("Quotation")
Set newRow = tbl.ListRows.Add
With newRow
    .Range(1) = txtProductID
    .Range(2) = cmbCategory
    .Range(3) = cmbDescription
    .Range(4) = txtPrice.Value
    .Range(5) = txtUOM
    .Range(6) = txtQty
    .Range(7) = txtTotal.Value
End With
Call ClearItemsSheet
End Sub

How do I get it to enter the data in the first empty row then add new row for next item?

Many thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top