“Automation Error: Object Invoked has disconnected from its clients”

前端 未结 4 1957
鱼传尺愫
鱼传尺愫 2021-01-13 22:20

I figured out what Nick was suggesting, and the following is the error number & description that I\'m getting:

\'-2147417848 (80010108)\' Automation

4条回答
  •  逝去的感伤
    2021-01-13 22:25

    This solution works for me:

    Before adding rows with Shift:=xlDown delete bottom rows on the worksheet

    'ADD THE ROWS YOU WANT
    
    Sheets("XXXXXX").Range("A100000:A100100").EntireRow.Delete
    
    With Selection
    .Copy
    .Insert Shift:=xlDown
    End With
    

提交回复
热议问题