I have a userform with 1 combobox and 3 textboxes. I want to use vlookup to display the values in the texboxes based on the selection in the combobox. The first textbox works but after that it gives errors. Pls help. Here is my code:
Private Sub ComboBox1_Change()
Description = Application.VLookup(ComboBox1.Value, Range("A1:B17"), 2, 0)
TextBox1.Value = Description
Platform = Application.VLookup(ComboBox1.Value, Range("A1:B17"), 3, 0)
TextBox2.alue = Platform
End Sub
Application.VLookup(ComboBox1.Value, Range("A1:B17"), 3, 0)returns an error, since you want to return the 3rd column, when you defined the range with only 2 columns (` Range("A1:B17")`)TextBox2.alue = Platform- you missed 'V' inValue.