Compare a control value and a List Box value

S

Silvio

I need to check to see if the value from my control is also in the first
column of my list box. Something like: If me. MyControlvalue =
listBox.column(1) then do whatever...

How do I do this?
Thank you,
Silvio
 
B

Beetle

If Me.SomeControl = Me.MyListBox.Column(1) Then
'some code here...
End If

Keep in mind however that the Column property of a
list box uses a zero based index, so the first column is actually
Column(0), the second is Column(1), etc.
 

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