I have excel 2010 and I have a search button for my spreadsheet where I can search by name or part number. I works and highlites the found data green, that works perfect, HOWEVER, for some reason it moves the mouse to the first cell on next line on spreadsheet instead that line. I need the mouse to be on the column b on same line the found data is on. I entered code below
Code>
Private Sub CommandButton6_Click()
Dim SearchThis As String, Found As Range
Me.Unprotect Password:="123"
SearchThis = InputBox("Type Number or name.", "Property Search")
SearchThis = SearchThis & "*"
Set Found = Columns("c:k").Find(What:=SearchThis, LookIn:=xlFormulas, LookAt:=xlPart)
If Not Found Is Nothing Then
With Found
.Select
.Interior.ColorIndex = 4
End With
End If
Me.Protect Password:="123"
End Sub
Code >
thanks in advance for any help you may provide
Code>
Private Sub CommandButton6_Click()
Dim SearchThis As String, Found As Range
Me.Unprotect Password:="123"
SearchThis = InputBox("Type Number or name.", "Property Search")
SearchThis = SearchThis & "*"
Set Found = Columns("c:k").Find(What:=SearchThis, LookIn:=xlFormulas, LookAt:=xlPart)
If Not Found Is Nothing Then
With Found
.Select
.Interior.ColorIndex = 4
End With
End If
Me.Protect Password:="123"
End Sub
Code >
thanks in advance for any help you may provide