I have 2 textboxs. The first one is the name of a restaurant. I have a list of restaraunts and their phone numbers. If you type in the name of the restaruant in textbox1 I want the phone number displayed in textbox2.
Here's what code I'm trying:
When I run, TextBox2 remains blank.
So I tried the following code:
TextBox2 displays the same info as TextBox1. I want TextBox 2 to display the info in the cell that is one cell to the right of what is displayed in TextBox1.
Can anyone offer assistance?
Thank you.
Here's what code I'm trying:
Code:
Lunch = TextBox1.Value
Set FoundRange = Sheets("Sheet2").Cells.Find(what:=Lunch, LookIn:=xlValues, Lookat:=xlWhole)
TextBox2.Text = FoundRange.Offset(0, 1)
When I run, TextBox2 remains blank.
So I tried the following code:
Code:
Lunch = TextBox1.Value
Set FoundRange = Sheets("Sheet2").Cells.Find(what:=Lunch, LookIn:=xlValues, Lookat:=xlWhole)
TextBox2.Text = FoundRange.
TextBox2 displays the same info as TextBox1. I want TextBox 2 to display the info in the cell that is one cell to the right of what is displayed in TextBox1.
Can anyone offer assistance?
Thank you.