Unbound listbox anomaly

  • Thread starter Thread starter Rob Brookbanks
  • Start date Start date
R

Rob Brookbanks

I want to use a value from an unbound column of a listbox to populate a
bound text box, but it doesn't work as expected.

At the moment, I have to put the value into an unbound textbox called
TempSupplierRefBox by setting it's control source to

=ItemsListBox.Column(4)

Then I have to put this value into the bound text box with the following
code

SupplierRefBox.Value = TempSupplierRefBox.Value

I would have expected to be able to use the following,

SupplierRefBox.Value = ItemsListBox.Column(4).value

but it just says error 424, value required

Whilst my method works, it feels messy and I am sure there is a more
efficient way. I can't figure what I am doing wrong here... any help greatly
appreciated

TIA,

Rob
 
You can't use the Value property when using the Column property.

Change this line
SupplierRefBox.Value = ItemsListBox.Column(4).value

to this line
SupplierRefBox.Value = ItemsListBox.Column(4)
 
Back
Top