+ Reply to Thread
Results 1 to 9 of 9

combo box user form code for two combo boxes

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    combo box user form code for two combo boxes

    Hi,
    I have a user form with two combo boxes, the code below is what i used when only had one combo box, but when i use the same code one for each combo box, only one will work, obviously i did change the code to combo box 2 for the second one.

    please can anyone give me an idea where i went wrong.
    many thanks for reading

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    many thanks for reading and hopefully helping.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combo box user form code for two combo boxes

    What exact code are you using for 2 comboboxes?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    Re: combo box user form code for two combo boxes

    the code i used for one box as above, then entered again with a different range and box name

  4. #4
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    Re: combo box user form code for two combo boxes

    I think perhaps all the code for the two boxes should be together but nothing I have tried so far works, thank you for taking the time to look, maybe you can give me a code that will work.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combo box user form code for two combo boxes

    It's not 100% clear what code you have.

    If you just copied that code then you would get a ambiguous name detected on the UserForm_Initialize event.

  6. #6
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    Re: combo box user form code for two combo boxes

    that is exactley what happened, here is the code i used.

    Please Login or Register  to view this content.
    i tried just deleting initialize on the second lot of code, but the second combo box still did not work
    Last edited by robert.begley1; 12-01-2012 at 01:31 PM. Reason: spelling mistake

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combo box user form code for two combo boxes

    Try this.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    Re: combo box user form code for two combo boxes

    you are a genius, thank you so much, I have added to your reputation

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combo box user form code for two combo boxes

    Thanks Robert, was kind of worried it might not work for the Mac.

+ 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