默认情况下,会在下面添加行。在上面添加行但是没有使用ListObjects
的SO上有很多答案。我很感激帮助。
Private Sub CommandButton1_Click()
Dim the_sheet As Worksheet
Dim table_list_object As ListObject
Dim table_object_row As ListRow
Set the_sheet = Sheets("Decision Log")
Set table_list_object = the_sheet.ListObjects(1)
Set table_object_row = table_list_object.ListRows.Add(1)
End Sub
答案 0 :(得分:1)
这应该适合你:
Set table_object_row = table_list_object.ListRows(1).Range.EntireRow.Insert