Unbound listbox anomaly

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
 
K

Ken Snell

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top