LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default list box remove item by combobox

Try...

Option Explicit


Private Sub ComboBox1_Change()
Dim n&
With ListBox1
For n = (.ListCount - 1) To 0 Step -1
If .List(n, 2) = ComboBox1.Text Then .RemoveItem (n)
Next 'n
End With 'ListBox1
End Sub

Private Sub UserForm_Initialize()
ComboBox1.List = Array("DLR", "DIS", "SUP")
Dim vListData
vListData = ActiveSheet.Range("A1:C10") '//edit to suit
ListBox1.List = vListData
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Item To ComboBox List Minitman Excel Programming 10 September 3rd 08 09:54 AM
ComboBox Will Not Advance To next Item in list Minitman Excel Programming 0 May 29th 08 07:30 AM
Combobox item selection+pop up list N.F[_2_] Excel Programming 3 June 13th 07 10:53 PM
combobox list item with superscript boyze Excel Programming 1 April 26th 06 06:07 PM
Remove item from combobox. TOM Excel Programming 1 May 25th 04 10:29 AM


All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"