Hugo huijer
Member
Hi Chandoo,
I just recently learned how to add data from a userform into a data range, while adding a new empty row for each new data.
I now want to store this data in a table, instead of a simple range. I don't know what the code should look like. The method I used for entering the data in a simple range does not work, cause the table will not expand when a new row is entered. I need my sheet to input a new row (in the table) for each time data is entered in the userform. This data will then be entered in the new row.
Can anyone help me with this?
My current code looks like this. This worked for entering the data for a data range, not a table.
I just recently learned how to add data from a userform into a data range, while adding a new empty row for each new data.
I now want to store this data in a table, instead of a simple range. I don't know what the code should look like. The method I used for entering the data in a simple range does not work, cause the table will not expand when a new row is entered. I need my sheet to input a new row (in the table) for each time data is entered in the userform. This data will then be entered in the new row.
Can anyone help me with this?
My current code looks like this. This worked for entering the data for a data range, not a table.
Code:
Worksheets("REGISTER PROJECT").Range("B26").EntireRow.Copy
Worksheets("REGISTER PROJECT").Range("B26").Offset(1).EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
With Worksheets("REGISTER PROJECT").Range("B26")
.Offset(0, 0).Value = Me.cmbTypeWork.Value
.Offset(0, 1).Value = Me.txtActivity.Value
.Offset(0, 2).Value = Val(Me.txtBudget.Value)
.Offset(0, 3).Value = Me.txtDesc.Value
End With
MsgBox "This activity budget has been entered in the registry!", vbOKOnly, "Project variation budget input"