Thanks... but it did still not work...
I changed the code now to:
Sub AddDataRow()
Dim Table1 As String
Dim sheet As Worksheet
Dim table As ListObject
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayAlerts = False
Set sheet = ActiveWorkbook.Worksheets("Sheet1")
Set table = sheet.ListObjects.Item("Table1")
table.ListRows(table.ListRows.Count).Range.Copy
table.ListRows(table.ListRows.Count).Range.Insert Shift:=xlDown
table(table.ListRows.Count, Columns("e" & "g")).ClearContents
Application.CutCopyMode = False
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
However, I'm struggling now with another problem which is that I want to have the contents of some specific cells deleted when the row gets copied and that part is still not working... :-(
Bookmarks