Excel VBA remove blank row after cut

点点圈 提交于 2020-02-07 06:02:04

问题


I have this code which cuts and pastes an entire row to another sheet, how could I remove the blank row which now appears on the first sheet in which the original row was cut.

Set ASR = ActiveWorkbook.Sheets("Main")
Set LS = ActiveWorkbook.Sheets("Exclusions")

ASR.cells(i, "C").EntireRow.Cut Destination:=LS.Range("A" & LS.Rows.Count).End(xlUp).Offset(1)

I was hoping this line of code which I got from this answer would remove the blank rows, but it did not work

ASR.cells.Delete Shift:=xlUp

回答1:


ASR.cells(i, "C").EntireRow.delete



来源:https://stackoverflow.com/questions/38440947/excel-vba-remove-blank-row-after-cut

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!