Forum Discussion

Sue's avatar
Sue
Copper Contributor
Dec 12, 2021

.Find - I have found a value in Column 1 and want the value in Column 3 to be put in the combobox

Hi wonderful people! I have run into trouble with .find again!
[By the way - where is the Save button that I am being reminded to use? I only see Post and Cancel]
I have a cmbCharityID which has a drop down list from a data range on another sheet. This has 5 columns. I want it to look up a value in the first column (the value from another field on the form and have it show that value and the IRD Number which on selection, I want to show in the cmbCharityIRD field on the form. It works as far as the drop down list and selection BUT shows the first column value in the box despite the bound column being 3 and correctly shown in the drop down list which shows the first and third columns (The width of columns 2,4, & 5, is set to 0pts).

This is bad because I want this programmed on the afterupdate and OK procedures which involves:
With Worksheets("CharityID").Range("CIDDetails")
cmbCharityIRD = .Find(cmbCharity, , xlValues, xlWhole, xlByColumns, , True)
End With
which if you hover over cmbCharity shows the value correctly and if you hover over cmbCharityIRD shows the value correctly, but on F8 I get the message:
"Run time error"380". Could not set the value property. Invalid value property.
From the manual approach above the right selection is available but it seems the same issue is that I can not get the right bit of it (the IRD#) into the field.
Obviously I still have not fully understood find !
Thank you for any help you can suggest. Sue

1 Reply

Resources