I'm trying to add VBA code to add a record line in to specific columns but do not know if the table I'm adding to will stay the same. I found out how to add based on column names:
Dim LotTbl As ListObject
Dim newreccord As ListRow
Set LotTbl = ActiveWorkbook.Worksheets("Sheet1").ListObjects("Lot_Data")
Set newreccord = LotTbl.ListRows.Add
With newreccord
.Range(LotTbl.ListColumns("Lot Num").Index).Value = ActiveSheet.Range("B2")
.Range(LotTbl.ListColumns("Material").Index).Value = ActiveSheet.Range("B15")
End With
But now I need to transfer a large list but I would like to transpose it to the record. On the record these lines will always stay together columns are named Die 1 to Die 10. I would like to paste starting from Die 1 Column.
.range(LotTbl.ListColumns("Die 1").index).value = ActiveSheet.Range("E1:E13").value