View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default resetting a listbox after a macro

In addition to Rick's suggestion, unloading the UserForm will also reset all
the controls on it. But of course that would take some code modification if
you are now hiding the form (which is what it sounds like) instead of
unloading it. But without knowing exactly how you are initializing the
UserForm and how it is being handled to cause the ListBox to retain the
selected value, I can't offer much more.

"Rivers" wrote:

its on form its a row setting linked to a sheet and the code is too big to post

"JLGWhiz" wrote:

Is the ListBox on a Sheet or a UserForm? Is it initially loaded by RowSource
or by List or by AddItem. If on a Sheet, is it from the Forms toolbar or
from the Control Toolbox. Also, if it has associated code, you should post
that as well.



"Rivers" wrote:

hi all

is it possible to refresh a listbox in a form after a macro has run?

the list box is poplated by options on a worksheets the user selects an
option then the listboxes options change. what i require is the selected line
to disappear again to allow the user to select a new optioin at the moment
the line selected stays blue after the macro has updated its values

thanks
rivers