Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Textbox - search

I dont know how to do one thing.
I have filled column with some data (text).

i would like to create a search module.
in one textbox i want to enter letters and in another textbox (or list)
i want to see first matched name.

example:
1 aaaaaa
2 aaabbb
3 abbccc
4 aabbaa

if i enter a i would like to see 1
if i enter aaab i would like to see 2
i dont want to enter the whole phrase to see matched cell.
please help me
thanks in advice
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Textbox - search

Look at the find command

Dim rng as Range
set rng = Range("A1:A500").find(what:=Textbox1 & "*", _
After:=Range("A65536"), Lookin:=xlValues, _
Lookat:=xlWhole, SearchOrder:=xlbyColumn, _
SearchDirection:=xlNext, MatchCase:=False)
if not rng is nothing then
textbox2.Value = rng.row
Else
textbox2.value = 0
End if

--
Regards,
Tom Ogilvy

Greg wrote in message
om...
I dont know how to do one thing.
I have filled column with some data (text).

i would like to create a search module.
in one textbox i want to enter letters and in another textbox (or list)
i want to see first matched name.

example:
1 aaaaaa
2 aaabbb
3 abbccc
4 aabbaa

if i enter a i would like to see 1
if i enter aaab i would like to see 2
i dont want to enter the whole phrase to see matched cell.
please help me
thanks in advice



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
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
How do I search and replace text in a textbox in Excel? ToolQueen Excel Discussion (Misc queries) 2 July 7th 05 02:20 PM
How do I do a search and replace in a textbox in Excel? ToolQueen Excel Discussion (Misc queries) 0 June 27th 05 09:25 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 01: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"