I have a user form which has a combo box looking at data on another sheet. This is working correctly.
I have a text box alongside which I want to auto populate from data in column U based on the selection in column A selected in the combo box
I have given assigned the named range of tblTakeons to the data on the sheet but I cannot get my vlookup to work. I get runtime error 1004 Application-defined or object-defined error which I knows means it does not recognised the commands I am giving it, but I have looked at lots of previous posts and I cannot see what I am doing wrong. when I hover over the cboProperty.value I see the value selected in the combo box, but the problem appears to be finding the table of data to lookup the price from.
Any help would be greatly appreciated.
[code
Private Sub cboProperty_change()
If cboProperty <> "" Then
txtCurrentPrice.Value = WorksheetFunction.VLookup(cboProperty.Value, Worksheets("Team Vals - Take ons").Range(tblTakeons), 21, False)
End If
End Sub
[/code]
I have a text box alongside which I want to auto populate from data in column U based on the selection in column A selected in the combo box
I have given assigned the named range of tblTakeons to the data on the sheet but I cannot get my vlookup to work. I get runtime error 1004 Application-defined or object-defined error which I knows means it does not recognised the commands I am giving it, but I have looked at lots of previous posts and I cannot see what I am doing wrong. when I hover over the cboProperty.value I see the value selected in the combo box, but the problem appears to be finding the table of data to lookup the price from.
Any help would be greatly appreciated.
[code
Private Sub cboProperty_change()
If cboProperty <> "" Then
txtCurrentPrice.Value = WorksheetFunction.VLookup(cboProperty.Value, Worksheets("Team Vals - Take ons").Range(tblTakeons), 21, False)
End If
End Sub
[/code]