Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


in my form i have 2 textboxes that i'm trying to link.
for example:
textbox1= code
textbox2= disciption

in a sheet i have a range
in cells a1 to a100 there are codes
in cells b1 to b100 there are the discriptions

now is my question if it is possible to give the code in textbox1 and
textbox2 shows the discription automaticly.

can anybody tell me if it is possible and how it is done?


--
eyesonly1965
------------------------------------------------------------------------
eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
View this thread: http://www.excelforum.com/showthread...hreadid=541297

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


is there anyone who can help me with this problem?


--
eyesonly1965
------------------------------------------------------------------------
eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
View this thread: http://www.excelforum.com/showthread...hreadid=541297

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


HI

THE BELOW CODE WILL SOLVE YOU PROBLEM

Private Sub TextBox1_Change()
Cells.Find(What:=TextBox1.Value, After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
TextBox2.Value = ActiveCell.Offset(0, 1).Value

End Sub


DO LET ME KNOW IF THIS WORKS

REGARDS
RAZA


--
RAZA
------------------------------------------------------------------------
RAZA's Profile: http://www.excelforum.com/member.php...o&userid=34186
View this thread: http://www.excelforum.com/showthread...hreadid=541297

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


thanx,

the code works perfectly, it does excacly what i want.

greetings eyesonly1965;)


--
eyesonly1965
------------------------------------------------------------------------
eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
View this thread: http://www.excelforum.com/showthread...hreadid=541297

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


the code works perfectly when the input is found in the sheet,
but when the input is not found i get an error 91 (objectvariable or
blockvariable is not set).

and then you can end the code or debug, both i don't want.
because when you push the end button you have to start all over again.
and i don't want users to push the debug button, so they can screw up
the code.

this is what i have now.

-Private Sub txtBestellingArtikelCode2_Change()

ActiveWorkbook.Sheets("artikelen").Activate
Cells.Find(What:=txtBestellingArtikelCode2.Value,
After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
txtBestellingArtikelOmschrijving2.Value = ActiveCell.Offset(0,
1).Value

End Sub-

what i want it to do with a false input is that the value of
txtBestellingArtikelOmschrijving2 is set to not known.
can anybody help me?


--
eyesonly1965
------------------------------------------------------------------------
eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
View this thread: http://www.excelforum.com/showthread...hreadid=541297



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lookup value in sheet


Private Sub TextBox1_Change()

Set Avalue = Cells.Find(What:=TextBox1.Value, After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False)
if Avalue is nothing then msgbox "Item not found" else Avalue.select
TextBox2.Value = ActiveCell.Offset(0, 1).Value

End Sub


--
RAZA
------------------------------------------------------------------------
RAZA's Profile: http://www.excelforum.com/member.php...o&userid=34186
View this thread: http://www.excelforum.com/showthread...hreadid=541297

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
Macro to lookup a sheet, number, then display in origonal sheet abbsy3 New Users to Excel 3 November 9th 10 12:19 PM
lookup single value in one sheet, return multiple results from theother sheet Chuck[_3_] Excel Worksheet Functions 1 April 4th 08 06:17 AM
Sheet lookup judgejulz Excel Discussion (Misc queries) 1 February 20th 07 10:17 AM
Lookup cell contents in on sheet based on a formula in second sheet Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 30th 05 04:11 PM
Lookup from another sheet Jane Doe Excel Worksheet Functions 9 January 24th 05 12:13 AM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"