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?
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?
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
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks