Solved

Move Item To Top Of ComboBox

Posted on 2002-05-02
10
228 Views
Last Modified: 2008-02-26
I am working with a combobox that is sorted.  I want to add an item after the sorted items are entered that will be at the top of the combobox... like NONE.

I don't want to use a space or an underscore to move it to the top... anyway to do this???

Thanks!
0
Comment
Question by:MTroutwine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6986163
No.  The only other way would be for you to maintain the sorted items and leave the Sort property = False.

Anthony
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6986195
Indeed, sort the items first and then add them to the combo box is the only way of doing this.
0
 
LVL 18

Expert Comment

by:deighton
ID: 6986226
'with.sorted is true
   
    Combo1.AddItem "Bunk"
    Combo1.AddItem "Abunk"
    Combo1.AddItem "NONE", 0
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 18

Expert Comment

by:deighton
ID: 6986230
note that your combo has .sorted=true in properties.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6986239
deighton,

You are right.  I overlooked that solution.

Anthony
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6986392
i am late!
0
 
LVL 18

Expert Comment

by:deighton
ID: 6986412
..so did I, it was an accident, I was trying to change sorted to .false then add it to the top - you can't change to .false, but adding it to the top still seems to work.
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 150 total points
ID: 6986507
Alternately you can do what Microsoft did ni its properties listing (with name, custom, etc.) and surround it with parentheses:  "(None)"

This will also reinforce the idea that this is not part of the dataset.
0
 
LVL 3

Author Comment

by:MTroutwine
ID: 7016464
Sorry for the delay on this... I used your idea of "(None)".  Works fine now.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7016714
Glad you liked the idea (even if it came from Microsoft), and thanks for the "A" grade.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question