search buttons please help
Hi Michael,
No, work is fine... thanks for asking :). As I said, I relly wasn't
trying to make a personal comment. I know it sounded like I was but I
was simply very puzzled and I really couldn't think of another way to
ask. I sincerely do apologise.
As for your question, the following code should give a starting point:
Private Sub CommandButton1_Click()
Dim SearchStr As String
SearchStr = TextBox1.Text
Cells.Find(What:=SearchStr, After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
This assumes you have added a form with a text box called TextBox1 and
a button called CommandButton1. If you want to use the returned range
somewhere, get rid of the ".Activate" at the end of the search bit,
and use a variable to catch the range: Set FoundRng = Cells.Find(...
Cheers,
Ivan.
On Apr 2, 12:34*am, Michael wrote:
so first of all u r not beeing rude its curiosity isnt it
second of all its database for people who dont know excel that well as i
think you do
third of all my Boss gave me that order
forth of all r u able to help me ? or should i wait for someone who knows
how to do it cuz i really need a help.
Meanwhile save ur personal comments for yourself :-) I had asked for help
not asked what i want to achieve- Are you having a bad day at work ? ;-)
Cheers,
Michael
|