reddcannon
Board Regular
- Joined
- Aug 11, 2011
- Messages
- 118
The code below came from you wonderful people at Mr. Excel, however I have one slight problem. If for example I push the button to search for 75 it goes to 275 which is hundreds of rows before 75. And no I cannot change the sort order of part numbers, because they are actually done by name and must remain in the order I have them. Is there a way to get a more accurate search out of this code
Private Sub CommandButton2_Click()
Dim searchthis As String, Found As Range
Me.Unprotect Password:="123"
searchthis = InputBox("Type Name or Number.", "Property Search")
Set Found = Range("A:A,C:C").Find(What:=searchthis, LookIn:=xlFormulas, LookAt:=xlPart)
If Not Found Is Nothing Then Found.Select
Me.Protect Password:="123"
End Sub
Private Sub CommandButton2_Click()
Dim searchthis As String, Found As Range
Me.Unprotect Password:="123"
searchthis = InputBox("Type Name or Number.", "Property Search")
Set Found = Range("A:A,C:C").Find(What:=searchthis, LookIn:=xlFormulas, LookAt:=xlPart)
If Not Found Is Nothing Then Found.Select
Me.Protect Password:="123"
End Sub