+ Reply to Thread
Results 1 to 3 of 3

excel 2010 one another

  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

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: excel 2010 one another

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: excel 2010 one another

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    You can change your title to "Issue with dropdowns in excel 2010".
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

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