Using a TextBox in a Userform

B

bobl

How do I use a textbox (or similar tool) in a userform to display the results
of a lookup based on another input box in the same userform. In other words,
I want to enter a number into field one and have field two show the results
of a lookup all before pressing the OK button.
 
B

Bob Phillips

Private Sub TextBox1_AfterUpdate()
With Me

.TextBox2.Text = Application.VLookup(.TextBox1.Text,
Worksheets(1).Columns("A:B"), 2, False)
End With
End Sub



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top