I keep getting a
Object invoked has disconnected from its clients
from running this line
Workbooks("LastParamChanges").Sheets("LastChanges").Range("A9").EntireRow.Insert shift:=xlDown
When the error message pops up and I click debug to go to that line, I click F8 to continue to the next line, another error message pops up saying
Runtime Error 1004: Insert method of Range class has failed
I also have Application.DisplayAlerts
and Application.EnableEvents
set to False if that helps.
I had the same problem. The solution that worked for me was to add this code before the
.Insert
statement:It seems that you first need to edit the sheet before inserting any rows.