+ Reply to Thread
Results 1 to 13 of 13

ComboBox to select UserForm

  1. #1
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    ComboBox to select UserForm

    Hi ALL

    I am trying to show a ComboBox in Excel which should allow the user to select the required UserForm. My coding does not work, even though I have used the same coding before.

    Please see the attached example.

    Thanks a lot!
    Attached Files Attached Files
    Last edited by sgp; 12-12-2011 at 04:38 AM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: ComboBox to select UserForm

    Something similar to this?
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: ComboBox to select UserForm

    hi sgp,
    I use the snb's code for it, it works for me, try the attachement
    Attached Files Attached Files
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: ComboBox to select UserForm

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

  5. #5
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: ComboBox to select UserForm

    Thanks for your help guys

    The way the code is written shows all userforms in one combo box - could this be adjusted so that combobox1 shows xyz userforms and combobox 2 shows 123 userforms.

    Thanks a lot!

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox to select UserForm

    What reason do you have for multiple UserForms?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: ComboBox to select UserForm

    I have userforms based on different categories. I would like the following combobox:

    1- where the user can select the main categories
    2 - lists of categories that are not classed as the main categories.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox to select UserForm

    I think you would be better with one userform & a select categories on that userform, it's really hard to advise without knowing what the end project is

  9. #9
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: ComboBox to select UserForm

    Thanks for the suggestion - the forms are slightly detailed and I dont think I would be able to fit everything on one form.

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox to select UserForm

    Then a MultiPage control. Usually a a UserForm is used for Data entry so really I would expect the data to be similar

  11. #11
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: ComboBox to select UserForm

    or using the snb'code ....see if it helps you
    Please Login or Register  to view this content.
    and the code for comboboxes
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: ComboBox to select UserForm

    Hi john

    That works brilliantly - thanks a lot!

  13. #13
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: ComboBox to select UserForm

    hi sgp,
    glad to be of help, I've just modified a little bit the snb's 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