Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing item from combobox with vba


Tom,

The comboboxes are populated during the UserForm_Initialize() event:

Private Sub UserForm_Initialize()
With comTeam1
.AddItem "Airdrie"
.AddItem "West Lothian"
End With - (many more teams in the real sheet)

With comTeam2
.AddItem "Airdrie"
.AddItem "West Lothian"
End With - (many more teams in the real sheet)
End Sub

So I felt that during the code I could use something like:

"comTeam2.RemoveItem comTeam1"

Thanks

Seamu

--
SO
-----------------------------------------------------------------------
SOS's Profile: http://www.excelforum.com/member.php...nfo&userid=540
View this thread: http://www.excelforum.com/showthread.php?threadid=26314

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing item from combobox with vba

You can, but removeitem requires an index

comTeam2.RemoveItem comTeam1.ListIndex

--
Regards,
Tom Ogilvy


"SOS" wrote in message
...

Tom,

The comboboxes are populated during the UserForm_Initialize() event:

Private Sub UserForm_Initialize()
With comTeam1
AddItem "Airdrie"
AddItem "West Lothian"
End With - (many more teams in the real sheet)

With comTeam2
AddItem "Airdrie"
AddItem "West Lothian"
End With - (many more teams in the real sheet)
End Sub

So I felt that during the code I could use something like:

"comTeam2.RemoveItem comTeam1"

Thanks

Seamus


--
SOS
------------------------------------------------------------------------
SOS's Profile:

http://www.excelforum.com/member.php...fo&userid=5406
View this thread: http://www.excelforum.com/showthread...hreadid=263147



Reply
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
item limit for a combobox? KarenH Excel Worksheet Functions 3 July 20th 06 09:30 PM
Removing item from combobox with vba SOS[_34_] Excel Programming 1 September 24th 04 01:28 PM
Remove item from combobox. TOM Excel Programming 1 May 25th 04 10:29 AM
Disable item in combobox Peter Pantus Excel Programming 2 December 30th 03 07:46 PM
ComboBox and select item Soniya Excel Programming 5 August 23rd 03 11:18 AM


All times are GMT +1. The time now is 06:58 PM.

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

About Us

"It's about Microsoft Excel"