Evening folks,
I made an input box to delete text between 2 ranges but its fallen flat and fails to start up ?
Sub DeleteBetween2Ranges()
Dim myRange As Range
Dim oText1 As String
Dim oText2 As String
oText1 = InputBox("Enter First Word :")
If Len(oText) = 0 Then
Exit Sub
End If
oText2 = InputBox("Enter Second Word :")
If Len(oText) = 0 Then
Exit Sub
End If
If Len(oText) = 0 Then
Exit Sub
End If
Set myRange = ActiveDocument.Range
With myRange.Find
Do While .Execute(FindText:="oText1*oText2", MatchWildcards:=True)
myRange.Text = ""
myRange.Collapse
Loop
End With
End Sub
I would like my input box as I have to always change the delete between the 2 ids
Any ideas welcome