I am using a record of an Excel Macro for a Goal Seek function on Excel. The problem is that when I try to add a new row in my sheet (both above the cells running the Goal Seek or even in the middle of them), the Macro that i recorded cannot be used anymore and I need to record it again (the error that i receive if i try to run it is:"1004, reference is not valid"). How could I fix this so that I don't need to record everytime the same Macro when I add/delete a row? Please help me. I attach below the pics and the VBA code
Code:
Sub Macro17()
'
' Macro17 Macro
'
'
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.GoalSeek Goal:=0, ChangingCell:=ActiveCell.Offset(-9, 0).Range( _
"A1")
End Sub