Compare a control value and a List Box value

  • Thread starter Thread starter Silvio
  • Start date Start date
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
 
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.
 
Back
Top