View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default lookup values from tabdeliminated text file

presented the following explanation :
Hi All,
I have read through all post on net in this weekend about my problem,
however I could not get right answer. I have a text file which is
named as stafflist with user id numbers, name and positions. Let's say
as below
1039 Tony Adwards SUP-V
1277 John Philips DRGSM-V
1326 Ken Through DRGSM-V
......

That is the file with 5000 users. I do not want to keep those user
details in excel file, because it takes a lot of space.Is there any
way to write a code to lookup value from that text file. Let's say
once enter in the id number( 1039 ) textbox1 textbox2 to display the
name and textbox3 display the position.
Thank you for the help
Baha


I'm thinking you could read the file into an array, or into a
recordset, or onto a hidden sheet. Then load the ID#s into a ComboBox
that is programed to auto-complete as you type. Optionally, the ID#
could be selected from its dropdown, OR continue keying the first
character so the control cycles through all entries beginning with that
character.

When the ID# you want is found the 2 textboxes update with the
appropriate info for the displayed ID#.

--
Garry

Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc