rharri1972
Board Regular
- Joined
- Nov 12, 2021
- Messages
- 132
- Office Version
- 2019
- Platform
- Windows
Hello!
I have a userform with a combobox1 and I am attempting to have information from the range of cells in the worksheet populate textboxes on the same userform.
I am trying with only one textbox at the moment and figured once I get the code right I should be able to add the others.
Here is the code that i found on Google that keeps returning cannot get the vlook up property of the worksheet function class:
Private Sub UserForm_Initialize()
Dim xRg As Range
Set xRg = Worksheets("Customers Select").Range("A2:G1000")
Me.ComboBox1.List = xRg.Columns(1).Value
End Sub
and for the combobox1
Private Sub ComboBox1_Change()
Me.TextBox13.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.Value, xRg, 2, False)
End Sub
Any help please?
I have a userform with a combobox1 and I am attempting to have information from the range of cells in the worksheet populate textboxes on the same userform.
I am trying with only one textbox at the moment and figured once I get the code right I should be able to add the others.
Here is the code that i found on Google that keeps returning cannot get the vlook up property of the worksheet function class:
Private Sub UserForm_Initialize()
Dim xRg As Range
Set xRg = Worksheets("Customers Select").Range("A2:G1000")
Me.ComboBox1.List = xRg.Columns(1).Value
End Sub
and for the combobox1
Private Sub ComboBox1_Change()
Me.TextBox13.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.Value, xRg, 2, False)
End Sub
Any help please?