I\'m trying to \'reset\' a listbox in Excel VBA when a form closes. Currently when I use the userform1.hide function the form disappears but when I open it up again using th
If you want to clear ONLY the selection (as you are using hide, not unload) then use:
me.listbox1.value = ""
If it is a multiselect listbox, you need to use:
Me.listbox1.MultiSelect = fmMultiSelectSingle
Me.listbox1.Value = ""
Me.listbox1.MultiSelect = fmMultiSelectMulti
this will clear the selection by setting it to single selection only and then clearing the selection, then setting the functionality to multi select again.
If you want to clear the entire list box (the options that you select) use:
Me.listbox1.clear