Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default How to make Combo Boxes not duplicate options

If you pick the Atlanta option(in the VBA code below) when you go back and
re-open the combo box it relists all the options atleast three times or more.
Is there any way after you make a selection on a combo box to keep the
option from duplicating and only show the list of options once?


Private Sub ComboBox1_Change()
ComboBox1.AddItem ""
ComboBox1.AddItem "Atlanta"
ComboBox1.AddItem "Chicago"
ComboBox1.AddItem "Washington DC"
Sheets("Questionaire").Range("N7") = ComboBox1.Value
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to make Combo Boxes not duplicate options

Why would you add the items to the combobox in the _change event?

If this is in a userform, maybe you could use userform_initialize to populate
that combobox.

Rusty wrote:

If you pick the Atlanta option(in the VBA code below) when you go back and
re-open the combo box it relists all the options atleast three times or more.
Is there any way after you make a selection on a combo box to keep the
option from duplicating and only show the list of options once?

Private Sub ComboBox1_Change()
ComboBox1.AddItem ""
ComboBox1.AddItem "Atlanta"
ComboBox1.AddItem "Chicago"
ComboBox1.AddItem "Washington DC"
Sheets("Questionaire").Range("N7") = ComboBox1.Value


--

Dave Peterson
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
Getting Combo boxes to change options based on other Combo boxes. Ancient Wolf New Users to Excel 1 March 27th 09 06:29 PM
Make text cells and combo boxes required? mlroy@savvis Excel Discussion (Misc queries) 2 July 24th 06 08:19 PM
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes DoctorG Excel Programming 3 February 23rd 06 12:15 PM
Options and Combo Boxes mtm4300 Excel Programming 1 February 9th 06 06:04 PM


All times are GMT +1. The time now is 06:28 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"