View Single Post
  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

Excel will not allow you nor the code to insert a new row if the sheet is
protected. What you have to do is include code in your macro to unprotect
the sheet at the start of your macro and protect the sheet at the end of
your macro. The commands a
Worksheet("TheSheetName").Protect
Worksheet("TheSheetName").UnProtect
HTH Otto
"oil_driller" wrote in message
...

This macro works fine doing it this way. The problem is when I try to
protect the worksheet, and activate the macro to insert a row and copy the
formulas from above to the blank row I get a "runtime error 1004" and it
does not copy the formulas from the rows above to the inserted ( blank )
row. Anyone have any suggestions as what to do? I am using Excel 2002.

Thanks,

Charlie