Hello Excellers,
Can you help me understand and resolve what's wrong with the following code? Sometimes, it does work but then after one or two test, I get this 1004 error message 'Unable to get the Match property of the WorksheetFunction class'.
It is a vba in a form to search the value of the textbox1 (which is a shorthand ISO CODE of the corresponding value in the combobox1), based on the value given in the combobox1.
Private Sub ComboBox1_Change()
Me.TextBox1.Text = Application.WorksheetFunction.index(Sheets("Components").Range("D2:D45"), Application.WorksheetFunction.Match(Me.ComboBox1.Value, Sheets("Components").Range("C2:C45"), 0), 1)
End Sub
My form has 2 combo boxes and 1 text box.
The Combobox3 has a category value, the second, Combobox1, has a dependent value, based on the Combobox3 and the listbox1 just vlookup for the corresponding shorthand code for the value in Combobox1
Example: ComboBox3: Bank / ComboBox1: NatWest / ListBox1: NW
Thank you very much for any of your advices, suggestions or helps and your contribution is much appreciated.
Bookmarks