Hello,
Here's a suggestion (with a bit of code clean up).
(warning : not tested !)
Sub test()
With ActiveSheet
If .Range("B4").Value = "" Or .Range("C4").Value = "" Or _
.Range("D4").Value = "" Or .Range("E4").Value = "" Then
MsgBox "Please enter data in all cells !", vbExclamation
Exit Sub
Else
.Unprotect
.Rows("4:4").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
.Shapes.Range(Array("Rectangle 7")).Select
With .Range("E4:E5")
.Locked = True
.FormulaHidden = False
End With
.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
End If
End With
End Sub
Bookmarks