Dear all,
I have a big problem regarding the line written in red of the following macro:
Sub Macro1()
Dim cellrow As Integer
cellrow = ActiveCell.Row
'copy & paste entire row
Rows(cellrow).Select
Rows(cellrow).Copy
Rows(cellrow + 1).Select
Rows(cellrow + 1).Insert Shift:=xlDown
End Sub
when it tries to paste that specific row in the worksheet i get "Run-time error '-2147417848 (80010108)': Automation error the object invoked has disconnected from its clients"
this error only pops up when i change the content of any unrelated cell in any other or same worksheet upon opening the excel file. that could for example just mean entering a "1" into an empty cell.
however, if i leave the sheets untouched upon opening and perform the macro staight away i dont get that error.
what also helps after performing any change is, saving, closing and reopening the file. in that case the macro also works.
annoyingly enough, when i copy and insert by hand i dont get any error at any time, so it is just due to the line marked in red...
hope that someone can help me solve this.
thanks a lot
michael
Bookmarks