duteberta
Board Regular
- Joined
- Jun 14, 2009
- Messages
- 92
- Office Version
- 365
- Platform
- MacOS
This code is working perfectly for adding values to one column in NEW table rows, But I wanted to add a 2nd value in the same newly created table row. But my syntax is bad- can you help me?
VBA Code:
' Add RECORD ROW to table
Sub AddRecordToTable()
Dim ws As Worksheet
Dim newRow As ListRow
Set ws = ActiveSheet
With ws.ListObjects("tbl_BANKS")
.ListRows.Add(1).Range(.ListColumns("ID").Index) = GUID
' How do I add a 2nd value such as: Also add the value "Smith" in the column "LastName"
End With
End Sub