VBA UserForm || Textbox Autofill Using Worksheets

sachinns

Board Regular
Joined
Jun 21, 2019
Messages
52
Hi Friends,

I Have a userform consisting of some textbox. I wanted to add one feature to the textbox1 like Auto filling when we write.

Example : I have a sheet where 2 columns are there. One is A and another is B. I have some datas in these columns as well.

So when user starts write in textbox1 , then it should autofill the textbox using the datas available in the Column A.

Can somebody help me on this.


Thanks
 
Try this
Code:
Private Sub ComboBox3_Change()
'...

Dim i As Long, Lastrow As Long
Dim otherValue as Variant

otherValue = Application.VLOOKUP(Combobox3.Text, WordsRange.Resize(,2),2,False)

If IsError(otherValue) then otherValue = vbNullString
Me.Textbox2.Text = otherValue

End Sub
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top