I've tried all the options below, I can't get a cell with text of a number to be counted. Do I need a new approach or can someone fix my code.
Here is the code to date and the approaches commented out.
Private Sub CommandButton4_Click()
Dim rngEntryBottomRow As Range
Dim Msg As Integer
Dim Response As Integer
Dim colIndex As Integer
Dim cnt As Integer
Application.EnableEvents = False
Application.ScreenUpdating = False
Set rngEntryBottomRow = Range("Below_Entry_Bottom_Row").Offset(-1)
cnt = 0
For colIndex = 1 To 8
With rngEntryBottomRow.Cells(0, colIndex)
If .HasFormula Or .Value <> "" Then cnt = cnt + 1
'If Not .Value Is Null Then cnt = cnt + 1 '<<<<<<<<<<<<<Different approaches
'If .SpecialCells(xlConstants) > 0 Then cnt = cnt + 1
'If .SpecialCells(xlConstants)= True Then cnt = cnt + 1
End With
Next colIndex
If cnt > 3 Then
Msg = MsgBox("You are attempting to Delete a Row that contains User Input." _
& " Delete Row Failed", vbOKOnly + vbCritical, "Can Not Delete Row with Information")
If Response = 1 Or 2 Then GoTo RET
End If
If cnt = 3 Then
With rngEntryBottomRow
.EntireRow.Delete
End With
End If
RET:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Bookmarks