Haven't seen this elsewhere. My intent is to create a Macro to delete rows unless the row is a "master" row. Master Rows are easily identifiable because the value in Column A is always 7 characters.
I thought this would work. ANy suggestions?
Sub DeleteRow()
' Disables protected sheet
ActiveSheet.Protect Password:="password", UserInterFaceOnly:=True
Dim X As String
X = ActiveCell.Offset(1, 0).Range(A.1).Select
If Len(X) = 7 Then GoTo NoDeleteRow:
With ActiveCell
.EntireRow.Copy
Selection.Delete Shift:=xlUp
End With
End If
NoDeleteRow:
warning = MsgBox("This Row Can Not Be Deleted")
End Sub
I thought this would work. ANy suggestions?
Sub DeleteRow()
' Disables protected sheet
ActiveSheet.Protect Password:="password", UserInterFaceOnly:=True
Dim X As String
X = ActiveCell.Offset(1, 0).Range(A.1).Select
If Len(X) = 7 Then GoTo NoDeleteRow:
With ActiveCell
.EntireRow.Copy
Selection.Delete Shift:=xlUp
End With
End If
NoDeleteRow:
warning = MsgBox("This Row Can Not Be Deleted")
End Sub