Solved

Activate only 1 combo box

Posted on 2000-03-13
5
193 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 25 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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
Course of the Month9 days, 13 hours left to enroll

623 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