Highlight 1 row in listbox per VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I want to highlight a row in one listbox per VBA code. I tried this
cat_I.Value containing the actual value (bound column):

List10.Selected(cat_I.Value) = False
List10.Selected(cat_I.Value - 1) = True
refresh

The value of list10 is now cat_I.Value - 1 but the highlighted row is still
cat_I.Value
Can anyone help me please
Thanks
 
hallo
thanks for the message, if i take away the refresh the list will not be
resorted
 
In that case try running the refresh before setting the list box line number

List10.Requery
List10.Selected(cat_I.Value) = False
List10.Selected(cat_I.Value - 1) = True
 

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

Back
Top