I have sort of a similar problem with a userform with a listbox of
employees. I read thru all this thread, and I tried several things
that seemed to work for Lisa, but it didn't work in my userform.
I have a list of employess with starting with their employee number
in the first column, name in the second, what team they are on in
the 3rd column. Using the listbox click event, clicking on any of
them puts the selected information in 3 textboxs to the side, so
they can edit the info/make corrections. I have commandbuttons for
moving up and down the list "Next" and "Previous", so the supervisor
can scroll through the list and check associated details. (I also
have a sub to add line to the listbox to add a new employee).
All of that works fine, no problem except for one little thing,
which will only be a irritation if a supervisor has a long list of
employees.
The problem is that when I click on one of the editing textboxes,
like for example the one for "Employee Name" . . . and make a
spelling correction, the textbox change event fires to correct the
name on the spread sheet and the listbox jumps back to the first
name at the top of the list. I tried about 4 or 5 ways to get it to
reset back to the name that I'd just corrected (for example the name
at ListIndex 31) and it doesn't work. The name remains showing in
the textbox, but, the list box is scrolled all the way back to the
top.
So, the supervisor has to scroll all the way back down to the name
to continue checking the list. As I said, it's a minor irritation,
but for someone with a hundred employees or thousands, it would get
tedius.
Please help. I can send portions of code, if that helps, but I'm
not sure what portions you'd like to see, so let me know and I'll
send it.