Help with Find

  • Thread starter Thread starter scottnshelly
  • Start date Start date
S

scottnshelly

hello,
I am trying to make a macro that will be user-friendly. I want it t
pop up an input box and ask for an agent's ID number, then go to th
database page and do a search for the ID number entered into the inpu
box. i have tried for about 3 hours now to make this work with n
avail. any suggestions
 
Try this one that looks in column A

Sub FindExample()
Dim FindString As String
Dim Rng As Range
FindString = InputBox("Enter a number")

If Trim(FindString) <> "" Then
Set Rng = Range("A:A").Find(What:=FindString, _
After:=Range("A" & Rows.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then Application.Goto Rng, True
End If
End Sub
 
That was a warning to Ron and other potential responders that you have the same
question posted multiple times.

And you have one more reply at that other thread.
 
sorry,
i didn't know i wasn't supposed to do that. i won't let it happe
again. i'm new. i just wanted to get some advise from the experts.
appreciate all of your help and i apologize if i have offended anyon
 
No problem.

But by posting multiple times, you have to check each for possible responses.

And it sometimes wastes time for responders who don't know that someone already
answered in a different thread.

But even worse, sometimes you don't get that give and take that can spark a very
good answer.
 

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

Similar Threads


Back
Top