duteberta
Board Regular
- Joined
- Jun 14, 2009
- Messages
- 89
- Office Version
- 365
- Platform
- MacOS
I'm creating a data entry form that will automatically add new table records when clicking an "Add" button.
In writing the code, instead of referring to
myRow.Range("3") = Range("$C$3")
I need to reference the target table column with the correct syntax. So not "3" but instead something like "MASTER[Status]". It's not working for me.
What language would I use to map correctly? Once I get the correct language I will map all the rest of my fields.
In writing the code, instead of referring to
myRow.Range("3") = Range("$C$3")
I need to reference the target table column with the correct syntax. So not "3" but instead something like "MASTER[Status]". It's not working for me.
What language would I use to map correctly? Once I get the correct language I will map all the rest of my fields.
VBA Code:
Sub RoundedRectangle1_Click()
Dim myRow As ListRow
Dim intRows As Integer
intRows = ActiveWorkbook.Worksheets("MASTER").ListObjects("MASTER").ListRows.Count
Set myRow = ActiveWorkbook.Worksheets("MASTER").ListObjects("MASTER").ListRows.Add(intRows)
myRow.Range("3") = Range("$C$3")
End Sub