ListBox problem
Hi Mike
It depends on how you populated the list in the first place - the nice
method (setting the controlsource) is easy to update - just redefine the
controlsource with the new number of rows / columns as required after each
action where the user can change the underlying data.
e.g.
listbox1.controlsource = "A1:B10" on first run
user adds 2 rows so redefine it as
listbox1.controlsource = "A1:B12"
If you populate the list manually (listbox1.additem) then you'll need to
either identify the new / changed items and add them explicitly or clear the
existing list (listbox1.clear) and add each item in turn again....
Hope this helps
David
"Mike Fogleman" wrote in message
...
I have a listbox on a userform. The listbox populates properly the first
time through. If I try to run the userform again only part of the list is
there. If I close and re-open the workbook it works OK again, but not on
the
second pass. I have used Unload UserForm and UserForm.Hide from the OK CB
on
the form. How do I re-set the listbox so it will populate properly the
second time?
TIA, Mike
|