Hi all,
I found this code after looking around the web. The only code I have added is "If R = Empty Then Exit Sub".
Private Sub Search_Click()
Dim Q As String
Dim T As Worksheet, R As String, S As Range
R = InputBox("Please Enter Colour", "Colour Search")
'--------------------------
'Don't remove this code
If R = Empty Then Exit Sub
'--------------------------
For Each T In ThisWorkbook.Sheets
Set S = T.Cells.Find(R, LookIn:=xlValues)
If Not S Is Nothing Then
Q = S.Address
Do
S.Interior.ColorIndex = 36
Set S = T.Cells.Find(S)
Loop While Q <> S.Address
End If
Next
End Sub
Question:
I want to highlight the "inputbox (R)" and the cells row its found in.
Edit: Current code works well.