View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bamenell bamenell is offline
external usenet poster
 
Posts: 2
Default Using Input Bx to Find Record

This works just like I needed it to. Thank you very much!
--
Peace,
Brent

JE McGimpsey wrote:
One way:

Private Sub CommandButton6_Click()
Dim rngOrder As Range
Dim strReferenceNumber As String

strReferenceNumber = Application.InputBox( _
Prompt:="Enter P.O. Number", _
Title:="Enter P.O. Number", _
Type:=2)

Set rngOrder = ActiveSheet.Range("A:A").Find( _
what:=strReferenceNumber, _
lookat:=xlWhole)

If rngOrder Is Nothing Then
MsgBox "P.O. not found"
Else
ActiveSheet.Unprotect
rngOrder.Offset(0, 1).Select
End If
End Sub

I got this code to work and find a record in a range of data and select that
row. But it only finds numbers. I need it to find a string, or a letter-

[quoted text clipped - 27 lines]

End Sub


--
--
Peace,
Brent