Greetings all, I'm having an issue with the following code. Based on the debug, it's an issue with the Set Range line but I'm not sure what I'm doing wrong.
Thanks in advance for the assistance!!!
Private Sub Delete_Word()
Dim Cel As Range, Range As Range
Dim Word As String
Set Range = Range("B1:B65536").Columns(1)
Word = "theword"
Application.ScreenUpdating = False
For Each Cel In Range
If Cel Like "*" & Word & "*" Then
Cel = Replace(Cel, Word, "")
'To remove the double space that follows ..
Cel = Replace(Cel, " ", " ")
End If
Next Cel
Application.ScreenUpdating = True
End Sub
Bookmarks