Good Day
I hava a question regarding vlookup and Textbox's
Legend:
Sample Data Range:"A3 to B6"
in Userform
TextBox1 and TextBox2
Command Button
When I Enter a Value in TextBox1 = column A3 in worksheet,And Press the Command Button
Result shows in TextBox2= column B3 in worksheet.
My issues are;
1.Instead of Click Event can i use Change Event instead(remove command button and key directly to TextBox1)
2.Everytime I make a Name Range for my table("A3:B6") the code stop working.
I hava a question regarding vlookup and Textbox's
Legend:
Sample Data Range:"A3 to B6"
in Userform
TextBox1 and TextBox2
Command Button
When I Enter a Value in TextBox1 = column A3 in worksheet,And Press the Command Button
Result shows in TextBox2= column B3 in worksheet.
VBA Code:
Private Sub CommandButton1_Click()
Dim z As Double
z = TextBox1.Value
TextBox2.Text = Application.WorksheetFunction.VLookup(z, Sheets("Sheet1").Range("A3:B6"), 2, False)
End Sub
My issues are;
1.Instead of Click Event can i use Change Event instead(remove command button and key directly to TextBox1)
2.Everytime I make a Name Range for my table("A3:B6") the code stop working.