Results 1 to 3 of 3

excel 2010 one another

Threaded View

  1. #1
    Registered User
    Join Date
    03-29-2012
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    7

    excel 2010 one another

    i have problem in working with 3 combos in excel.
    combo 1 to drop down " Region"
    combo 2 to drop down "Country'
    combo 3 to drop down ' City'

    Based on 'Region" selected in combo 1, combo 2 should list "country" in the "Region"
    Based on "Country" selected in combo 2 combo 3 should list "City" in the "Country"
    I have used "Named Ranges" and "RowSource" in VBA coding.
    first 2 combos worked all right, but the 3 rd combo didn't.
    attached the worksheet file
    Please help me
    **** Coding ****
    Option Explicit
    Private Sub ComboBox1_Change()
    If Me.ComboBox1.Value = "Europe" Then Me.ComboBox2.RowSource = "Europe"
    If Me.ComboBox1.Value = "Pacific" Then Me.ComboBox2.RowSource = "Pacific"
    If Me.ComboBox1.Value = "Asia" Then Me.ComboBox2.RowSource = "Asia"
    End Sub
    Private Sub ComboBox2_Change()
    If Me.ComboBox2.Value = "Gcity" Then Me.ComboBox3.RowSource = "Gcity"
    If Me.ComboBox2.Value = "Fcity" Then Me.ComboBox3.RowSource = "Fcity"
    If Me.ComboBox2.Value = "Acity" Then Me.ComboBox3.RowSource = "Acity"
    If Me.ComboBox2.Value = "Jcity" Then Me.ComboBox3.RowSource = "Jcity'"
    If Me.ComboBox2.Value = "Icity" Then Me.ComboBox3.RowSource = "Icity"
    End Sub
    Private Sub UserForm_Initialize()
    Me.ComboBox1.RowSource = "Region"
    End Sub
    ***********************************
    Attached Files Attached Files
    Last edited by mjram; 03-29-2012 at 03:39 AM. Reason: added vb coding

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1