Strange Excel Bug?

K

kirkm

In my Private Sub List1_Enter I assign the row source to a
worksheet and a variable - mline - to a particular row in that
sheet. The purpose is, when the listbox opens, to have that line
selected and highlighted.

List1.ListIndex = mLine
List1.Selected(mLine) = True

This works most of the time, but sometimes the selected
row is *not* mline.

To check further, I added this (on the very next line)

frmReports.Caption = mCaption & " " & mLine

This shows the when the wrong line is highlit, mline
does have the right value.

Does anyone know, under what conditions could
Excel - with the code above fail to set the wanted
line to the value of mline ?

Thanks - Kirk
 

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