C
Country
I have a Excel 2000 spread sheet, with the following macro to insert
new row.
Sub InsertRow()
'
' Macro1 Macro
' Macro recorded 4/27/2004
'
'GoTo label, MyString
ActiveSheet.Unprotect
Application.Goto Reference:="MyCell"
ActiveCell.Select
ActiveCell.EntireRow.Insert
ActiveCell.Offset(-1, 0).Select
ActiveCell.EntireRow.Copy
ActiveCell.Offset(1, 0).Select
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
ActiveCell.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True
End Sub
The problem is that in the "Mycell" row I have some =SUM ranges an
when I run the macro the ranges do not update to include the ne
cells.
Exsample:
=SUM(M10:M52)
New row now 53
needs to read =SUM(M10:M53), etc.
Thank
new row.
Sub InsertRow()
'
' Macro1 Macro
' Macro recorded 4/27/2004
'
'GoTo label, MyString
ActiveSheet.Unprotect
Application.Goto Reference:="MyCell"
ActiveCell.Select
ActiveCell.EntireRow.Insert
ActiveCell.Offset(-1, 0).Select
ActiveCell.EntireRow.Copy
ActiveCell.Offset(1, 0).Select
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
ActiveCell.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True
End Sub
The problem is that in the "Mycell" row I have some =SUM ranges an
when I run the macro the ranges do not update to include the ne
cells.
Exsample:
=SUM(M10:M52)
New row now 53
needs to read =SUM(M10:M53), etc.
Thank