Hi guys,
i am trying to update a new row of a Table (ListObject) making use of a simple UserForm, but am struggling with the code.
i would really appreciate if someone could take a look.
See attached
Thank you in advance!
Hi guys,
i am trying to update a new row of a Table (ListObject) making use of a simple UserForm, but am struggling with the code.
i would really appreciate if someone could take a look.
See attached
Thank you in advance!
Last edited by onmyway; 01-27-2015 at 04:11 AM.
This seems to work:![]()
oNewRow.Range(1, 4).Value = "Value For New cell" oNewRow.Range(1, 5).Value = Me.TextBox1.Value
Acts 4:12
Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.
Hi natefarm
I am trying to get away from referencing an absolute Cell. i want to make use of a method where I reference a Column name, and where it will not make a difference whether the position of the Column changes within my Table. That way i can add columns, move column etc., and don't need to change my code the whole time.
I was just going with the code you had provided. In what way do you intend to "reference a column name"?
One way:
![]()
oNewRow.Range(1, myTable.ListColumns("Column4").Index).Value = "Value For New cell" oNewRow.Range(1, myTable.ListColumns("Column5").Index).Value = Me.TextBox1.Value
Everyone who confuses correlation and causation ends up dead.
Or using ListColumns:
![]()
With myTable .ListColumns("Column4").DataBodyRange.Cells(oNewRow.Index).Value = "Value For New cell" .ListColumns("Column5").DataBodyRange.Cells(oNewRow.Index).Value = Me.TextBox1.Value End With
This is great, thank you all!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks