Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8824811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:43:40+00:00 2026-06-14T06:43:40+00:00

I have two combobox.The first combobox has three items as:{One, Tow, Three} now I

  • 0

I have two combobox.The first combobox has three items as:{One, Tow, Three} now I would like to load the second combobox based on what user select in combobox1.
For example if user select One in the from combobox1 then namebox1 will populate to combox2
and if if user select Two in the from combobox2 then namebox2 will populate to combox2 and so on..
Can you please let me know how I can do this in VBA?

Thanks

Here is the Update Code:

    Private Sub ComboBox1_Change()
     Me.ComboBox2.Clear
     Select Case Me.ComboBox1.Value
       Case "One"
        With Me.ComboBox2
            .RowSource = "nameBox1"
        End With
       Case "Two"
        With Me.ComboBox2
            .RowSource = "nameBox1"
        End With
       Case "Three"
        With Me.ComboBox2
             .RowSource = "nameBox1"
        End With
     End Select
    End Sub

Please be advise that I didn’t use .addItem to populate the ComboBox1. It hasbeen populate by same method .RowSource which is usinf excel collection selection box

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:43:41+00:00Added an answer on June 14, 2026 at 6:43 am

    The easiest way to do this would be using a Select Case statement.
    Suppose you had

    Private Sub ComboBox1_Change()
    
    Me.ComboBox2.Clear
    
    Select Case Me.ComboBox1.Value
        Case "One"
            ' If your data was information you wanted to put in yourself:
            With Me.ComboBox2
                .AddItem "Adam"
                .AddItem "Allen"
                .AddItem "Andy"
            End With
        Case "Two"
            ' If your data existed in a worksheet range
            ComboBox2.RowSource = MyRange.Address            
            End With
        End Select
    
    End Sub
    

    I hope this explains enough to get you going – Otherwise, I’m a bit confused – Can you explain what you mean by NameBox in your question

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two list that I load when my app starts. The first one
I have two comboboxes. First combobox is for selecting the manager and the second
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have a form with two ComboBoxes. The second ComboBox holds a list of
I am using Microsoft Visual Studio 2010 I have two Combobox. -Combobox1.Text -Combobox2.Text first
I have two combobox. I need get some value from first combobox1 after combobox1
So I have a ExtJs 4 Grid Panel that has two columns. Column ONE
I have two lists one displays cars company and the second one displays all
I have DataGridView which contains two ComboBox columns. The second ComboBox will be filled
I have two lists. The first one is hard-coded and the contents never change.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.