I have a multitab userform with many different controls.
has a total of 8 listboxes, 7 on one tab of the form, one
by itself on a different tab. had programmed both click
and double-click events for all 8. except for using
different arrays and referencing different controls, this
part of the double-click event code is identical for all
s = 3
i = theSelectedListBox.ListIndex
selectedItem = myArray(i)
myArray represents the values used to fill the listbox.
Now i have earlier versions of this project that i
retested to make sure i'm not crazy...it WORKED before.
but just noticed yesterday that recently the code for the
standalone box (on its own tab) no longer returns the
listindex value on a double-click event. in effect, every
time dblclick is used it returns a .listindex value of -
1, .value of Null (thus the code is now always having an
error on the 3rd line above because -1 is not a valid
I have checked and rechecked, even recreated the listbox,
so that there is no question it is IDENTICAL to the other
7 that are still working fine (form tab settings identical
as well). an earlier version of the project, which is ALSO
identical in code and listbox properties, still works. the
Click event for the same listbox DOES give the correct
listindex value, no errors there.
so why might the double-click event for this one
particular list box have stopped producing a valid
ListIndex value all of a sudden? Only thing that has
changed on our systems here is regular Windows updates,
plus other code that has nothing to do with this listbox
has been updated in the project. none of which explains to
me why other 7 listboxes are still working.
any suggestions welcome, as i do believe this will drive
me mad very soon :)