Hi All,
I've used in my excel the below VBA code assigned for inserting a row & keep formulas, however that code doesn't work while the worksheet is protected. Any hint on how to overcome it?
VBA Code:
With ActiveCell.EntireRow
.Copy
.Offset(1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
On Error Resume Next
.Offset(1).SpecialCells(xlCellTypeConstants).Value = ""
Application.CutCopyMode = False
On Error GoTo 0
End With
I am also facing a problem with the below code assigned as well, while the worksheet is protected. Any help on how to overcome it?
Sub DeleteEntireRow()
Selection.EntireRow.Delete
End Sub
I've used in my excel the below VBA code assigned for inserting a row & keep formulas, however that code doesn't work while the worksheet is protected. Any hint on how to overcome it?
VBA Code:
With ActiveCell.EntireRow
.Copy
.Offset(1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
On Error Resume Next
.Offset(1).SpecialCells(xlCellTypeConstants).Value = ""
Application.CutCopyMode = False
On Error GoTo 0
End With
I am also facing a problem with the below code assigned as well, while the worksheet is protected. Any help on how to overcome it?
Sub DeleteEntireRow()
Selection.EntireRow.Delete
End Sub