View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tony James[_2_] Tony James[_2_] is offline
external usenet poster
 
Posts: 15
Default Help:Find and Display

Have a look at the Find Method of the Range Object. There's an
example in the VBA help showing how to use it.

This could be useful!:

Private Sub cmdSearch_Click()

Set searchRng = Sheets(1).Range("A:A")

With searchRng
Set resultRng = .Find(TextBox1.Text, LookIn:=xlValues)

TextBox2.Text = TextBox2.Text & Sheets(1).Range("B" &
result.Row).Value & vbCrLf