T
Todd Huttenstine
Hey guys
here is the code I got so far.
I am trying to delete the entire row but when I run my
code I am getting the error "Object Required" What am I
doing wrong. I want the entire row to be deleted if the
code finds the value BSC in column T. Also some of these
cells have the value "BSC " (With multiple spaces).
How do I get the code to recognize any cell with the value
BSC as well as spaces aftwer the BSC?
Thank you
Private Sub CommandButton1_Click()
Dim cell As Range
Dim cola As Range
Set cola = Sheets("RDFMTD").Range("T2:T100")
For Each cell In cola
If cell.Value = "BSC" Then
'cell.Select
EntireRow.Delete
End If
Next
End Sub
here is the code I got so far.
I am trying to delete the entire row but when I run my
code I am getting the error "Object Required" What am I
doing wrong. I want the entire row to be deleted if the
code finds the value BSC in column T. Also some of these
cells have the value "BSC " (With multiple spaces).
How do I get the code to recognize any cell with the value
BSC as well as spaces aftwer the BSC?
Thank you
Private Sub CommandButton1_Click()
Dim cell As Range
Dim cola As Range
Set cola = Sheets("RDFMTD").Range("T2:T100")
For Each cell In cola
If cell.Value = "BSC" Then
'cell.Select
EntireRow.Delete
End If
Next
End Sub