Hi Guys,
I'm thick, I know, but I can't get this to work!
A sheet called "Data" with this table on it:
Serial Tail
No No
101 XZ300
102 XZ301
103 XZ302
104 XZ303
105 XZ304
106 XZ305
107 XZ306
... ..... etc
The whole table has the name "Fits", and is dynamic (Oh NO! not Dynamic Ranges again!!)
The Serial_No column is also dynamic, and it's called...
Yup, you guessed it: Serial_No
UserForm1 has a ComboBox called cboSerialNo and a TextBox called txtTailNo.
cboSerialNo has its RowSource property set to Data!Serial_No.
Button on the sheet to show the UserForm.
Click the button, up comes the form, select one of the numbers from the drop-down list (which appears perfectly),
then the ComboBox Change event does this:
Private Sub cboSerialNo_Change()
TextBox1.Value = Application.WorksheetFunction.VLookup(cboSerialNo.Value, Range("Fits"
, 2, 0)
End Sub
Only I get "Unable to get the VLookup property of the WorksheetFunction class" .... cue Fist through monitor, embarrassing sniggers from others in office, etc.
I know it's a piece of cake, I KNOW it's my syntax that's wrong, but WHY/HOW/WHERE??
Sorry to waste your valuable time: is there a FAQ on this subject?
Chris
I'm thick, I know, but I can't get this to work!
A sheet called "Data" with this table on it:
Serial Tail
No No
101 XZ300
102 XZ301
103 XZ302
104 XZ303
105 XZ304
106 XZ305
107 XZ306
... ..... etc
The whole table has the name "Fits", and is dynamic (Oh NO! not Dynamic Ranges again!!)
The Serial_No column is also dynamic, and it's called...
Yup, you guessed it: Serial_No
UserForm1 has a ComboBox called cboSerialNo and a TextBox called txtTailNo.
cboSerialNo has its RowSource property set to Data!Serial_No.
Button on the sheet to show the UserForm.
Click the button, up comes the form, select one of the numbers from the drop-down list (which appears perfectly),
then the ComboBox Change event does this:
Private Sub cboSerialNo_Change()
TextBox1.Value = Application.WorksheetFunction.VLookup(cboSerialNo.Value, Range("Fits"
End Sub
Only I get "Unable to get the VLookup property of the WorksheetFunction class" .... cue Fist through monitor, embarrassing sniggers from others in office, etc.
I know it's a piece of cake, I KNOW it's my syntax that's wrong, but WHY/HOW/WHERE??
Sorry to waste your valuable time: is there a FAQ on this subject?
Chris