I've written a Macro with an outer and inner loop to process 1 or more days
of data. Each day contains many lines which come from two sources and are
handled by the inner loop. The first listbox allows the user to choose which
day to process; the second box allows the user to select which source to
access. THE PROBLEM: the first box always works, but the second box either
does not initialize, and/or flashes on the screen very briefly and does not
allow user to make a selection. My investigation reveals that the listindex
for the second box has either the listindex of the first listbox or a
completely random number. The list boxes are populated by "reading" the
contents of a folder on the C drive and listing them. Here's the line of
code from the on_click event procedure:
UserSelect = Listbox1.list(listbox1.listindex)
I always load then unload this second box, but hide the first. Why is this
happening and is there a workaround?