Hello everyone i have simple vba code to find a word in the worksheet but i have a small issue, when i find the word the cursor moves to the word but the small window where i type the text disappears , i want to run the program continuously until i press the cancel button and below is my code, pls help me out Thanks in advance
Sub test2()
Dim x As String
Dim rng As Range
Dim cell As Range
Set rng = Range("D1", Cells(Rows.Count, "D").End(xlUp)).Rows
x = InputBox("Word you want to find?", "Find")
For Each cell In rng.Resize(, 2).Cells
If Not cell.Find(x) Is Nothing Then
cell.Select
Exit Sub
End If
Next
End Sub
Sub test2()
Dim x As String
Dim rng As Range
Dim cell As Range
Set rng = Range("D1", Cells(Rows.Count, "D").End(xlUp)).Rows
x = InputBox("Word you want to find?", "Find")
For Each cell In rng.Resize(, 2).Cells
If Not cell.Find(x) Is Nothing Then
cell.Select
Exit Sub
End If
Next
End Sub