View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 1
Default Searching a spreadsheet using a vba form

There are a couple of possible variables to exactly what you want t
achieve. You may need to come back. This is the basic search :-


Code
-------------------
Private Sub CommandButton1_Click()
Dim foundcell As Object
myvalue = TextBox1.Value
Set foundcell = ActiveSheet.Columns(1).Find(myvalue)
If foundcell Is Nothing Then
MsgBox ("Not found.")
Else
foundcell.Select
End If
End Sub

-------------------


--
Message posted from http://www.ExcelForum.com