Do you mean that I should not copy anything? I have a lot of previous versions. Do you think I could try an earlier version first?
Private Sub cmdDelSelectRow_Click()
ActiveSheet.Unprotect Password:="npssadmin"
Dim rng As Range
On Error Resume Next
With Selection.Cells(1)
Set rng = Intersect(.EntireRow, ActiveCell.ListObject.DataBodyRange)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "Please select a cell within a row that you want to delete.", vbCritical
Else
rng.Delete xlShiftUp
End If
End With
'ListObjects("NPSS_quote").ListColumns("10%Increase").DataBodyRange.Value = "1"
Application.EnableEvents = True
'ActiveSheet.Protect Password:="npssadmin"
End Sub
Set wsDst = Workbooks(DocYearName).Worksheets(Combo)
Private Sub cmdDelSelectRow_Click()
ActiveSheet.Unprotect Password:="npssadmin"
Dim rng As Range
On Error Resume Next
With Selection.Cells(1)
Set rng = Intersect(.EntireRow, ActiveCell.ListObject.DataBodyRange)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "Please select a cell within a row that you want to delete.", vbCritical
Else
[color=red]If rng.HasFormula = False Then rng.Delete[/color]
End If
End With
'ListObjects("NPSS_quote").ListColumns("10%Increase").DataBodyRange.Value = "1"
Application.EnableEvents = True
'ActiveSheet.Protect Password:="npssadmin"
End Sub