View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default listbox remove Item

for an activeX Listbox

for i = listbox.Listcount -1 to 0 step -1
if listbox.Selected(i) then
listbox.RemoveItem i
end if
Next

--
Regards,
Tom Ogilvy


"Simon Shaw" <simonATsimonstoolsDOTcom wrote in message
...
I am trying to remove multiple selected items from a ListBox... the code:

myListBox.RemoveItem myListBox.ListIndex

only removes the last selected item. I have tried a number of things, but
keep getting bad results. Does anyone have an example of this?

Thanks

Simon Shaw