tbrynard01
Board Regular
- Joined
- Sep 20, 2017
- Messages
- 131
- Office Version
- 365
- Platform
- Windows
I have a table where I insert a line and then copy and paste the previous line as a value as the data is being fed to the table from another worksheet.
I use this code but can't figure out my error as I've updated the formulas in the table yet when I insert a line it's not keeping the updates, it reverts back to the old formulas?
This is the code that I'm using:
Dim n As Long
With ActiveSheet.ListObjects("Table927")
.ListRows.Add AlwaysInsert:=True
n = .DataBodyRange.Rows.Count
.ListRows(n - 1).Range.Copy
.ListRows(n - 1).Range.PasteSpecial xlValues
End With
Application.CutCopyMode = False
I use this code but can't figure out my error as I've updated the formulas in the table yet when I insert a line it's not keeping the updates, it reverts back to the old formulas?
This is the code that I'm using:
Dim n As Long
With ActiveSheet.ListObjects("Table927")
.ListRows.Add AlwaysInsert:=True
n = .DataBodyRange.Rows.Count
.ListRows(n - 1).Range.Copy
.ListRows(n - 1).Range.PasteSpecial xlValues
End With
Application.CutCopyMode = False