+ Reply to Thread
Results 1 to 2 of 2

Is a search box possible?

  1. #1
    Registered User
    Join Date
    06-30-2006
    Posts
    9

    Is a search box possible?

    I have pages upon pages of names with data connected to it in different tables. Is there a way to create a textbox or something of that sort, that can be used as a search w/o opening find?

  2. #2
    Tom Ogilvy
    Guest

    RE: Is a search box possible?

    Turn on the macro recorder, then do Edit=>find with an argument that can be
    found

    turn off the macro recorder

    Now look at the code.

    You can replace the
    . . . cell.Find(what:="constant", . . .

    with

    . . . cells.find(what:=Textbox1.Text, . . .

    or use any variable holding the value to search for

    also, instead of

    . . . cells.Find(. . .).Activate

    use
    Dim rng as Range
    set rng = cells.find(. . . )
    if not rng is nothing then
    ' rng now holds a reference to the found cell
    else
    ' value wasn't found
    end if

    Using the Find method does not display the find dialog. Make sure you set
    all the parameters appropriately, since many of them are persistent and will
    inherit the current setting if you don't specify it. This can cause
    inconsistent and mysterious results.

    --
    Regards,
    Tom Ogilvy

    "DarklyCute1" wrote:

    >
    > I have pages upon pages of names with data connected to it in different
    > tables. Is there a way to create a textbox or something of that sort,
    > that can be used as a search w/o opening find?
    >
    >
    > --
    > DarklyCute1
    > ------------------------------------------------------------------------
    > DarklyCute1's Profile: http://www.excelforum.com/member.php...o&userid=35949
    > View this thread: http://www.excelforum.com/showthread...hreadid=560810
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1