Here is the macro:
The error code was :
Run-time error '1004':
Insert method of Range class failed
This worked yesterday and this morning. One thing I did was add a digital certificate to sign this Excel worksheet and now this.
What am i missing?? This was a little project to help the wife. Needed the Digital Certificate to get around the security settings at her work.
Code:
'make sure the current sheet is active
Worksheets("Sheet1").Activate
'select the previously named cell
Range("NF_Totals").Select
'insert a new row above the selected cell
ActiveCell.EntireRow.Insert <<<<<<< -------------------- offending line
'move to the formula cell in the row above the new row
Range("NF_Totals").Offset(-2, 9).Select
'copy the contents of that cell
Selection.Copy
'Move to the place to copy the formula into the new row
Range("NF_Totals").Offset(-1, 9).Select
'paste the formula into the new cell
ActiveSheet.Paste
'select the cell at the start of the new row
Range("NF_Totals").Offset(-1, -1).Select
'send ESC as if from the keyboard to remove the dashed marking from the copy command
Application.SendKeys "{ESC}"
The error code was :
Run-time error '1004':
Insert method of Range class failed
This worked yesterday and this morning. One thing I did was add a digital certificate to sign this Excel worksheet and now this.
What am i missing?? This was a little project to help the wife. Needed the Digital Certificate to get around the security settings at her work.
Last edited by a moderator: