Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Activate only 1 combo box

Posted on 2000-03-13
5
Medium Priority
?
196 Views
Last Modified: 2010-05-02
Hello,

     In Excel 97, I have a form that has 3 comboboxes.  I'd like the user to be able to choose only ONE of the combo boxes.  (I have 3 combo boxes for 3 different categories, and only 1 of those can be processed).  

     For example, if the user chose a selection in combobox 1, but then also tried to select something in combobox 2, combobox 1 would be DESELECTED, and the new choise (combobox2) is the new selection.

     Does anyone have the work around for this?  
   Thank you!!!
0
Comment
Question by:mlouie23
[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
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Marine
ID: 2614451
I never did VBA but here is a thought. Create a Control Array and depnding on the ComboBox selected disable the other 2.
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 2614586
The first item of the combobox reads something like "Select from list."  Then, with this code, if a selection is made in any of the combos, the others will reset to index 0 (top of list).

Private Sub Combo1_Click()
    If Combo1.ListIndex <> 0 Then
        'Reset all other combos
        Combo2.ListIndex = 0
        Combo3.ListIndex = 0
    End If
End Sub

Private Sub Combo2_Click()
    If Combo2.ListIndex <> 0 Then
        'Reset all other combos
        Combo1.ListIndex = 0
        Combo3.ListIndex = 0
    End If
End Sub

Private Sub Combo3_Click()
    If Combo3.ListIndex <> 0 Then
        'Reset all other combos
        Combo1.ListIndex = 0
        Combo2.ListIndex = 0
    End If
End Sub
0
 

Author Comment

by:mlouie23
ID: 2614700
Adjusted points from 15 to 25
0
 

Author Comment

by:mlouie23
ID: 2614701
Erik37,

    Great...thanks so much for helping me with these combo boxes.  I really appreciate it.  I want to award you more points for such a great solution, but bumping it up to 25 is all I could afford right now.  

Thank you!
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2614719
Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

722 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