Applying the find fuction to a button

  • Thread starter Thread starter hbp78
  • Start date Start date
H

hbp78

I'm having a tuff time applying the find function to a button. I'v
tried running a macro opening the find field; however, when I check th
VB code afterwards no code is listed. The only way I can obtain cod
is by putting in search criteria when doing the find. The values wil
constantly change so this method will not work.

I'm not sure if I should be making a macro for this using a button fro
the form tool bar or if theirs another way to do this with the contro
toolbox button.

Thanks for your help,

-Kevi
 
hbp78

Here is a simple find using a userform. You have to create a userfor
with a textbox and a command button.


Private Sub CommandButton1_Click()
Dim rng As Range
With UserForm1
Cells.Find(What:=.TextBox1.Text, lookat:=xlPart).Select
End With
End Sub


Hopt this gets you started


Charle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top