我正在尝试删除Excel电子表格的最后一行,但我不知道要放入rows.delete命令的参数的格式。它一直给我一个错误。
LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Rows("LastRow").Delete 'error type mismatch
对rows.delete参数的任何建议?
答案 0 :(得分:3)
LastRow.EntireRow.Delete Shift:=xlShiftUp
答案 1 :(得分:3)
试试这个:
Range("a65536").End(xlUp).Select
Selection.EntireRow.Delete