Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?


--
DarklyCute1
------------------------------------------------------------------------
DarklyCute1's Profile: http://www.excelforum.com/member.php...o&userid=35949
View this thread: http://www.excelforum.com/showthread...hreadid=560810

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Functions (search within search result) reply to this please Nick Excel Worksheet Functions 1 February 17th 09 03:57 AM
Functions (search within search result) Nick Excel Worksheet Functions 1 February 17th 09 03:51 AM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
I cant do a search on this forum. Everytime I search, it comes up with zero results viswanthank Excel Programming 3 June 10th 05 09:15 AM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM


All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"