+ Reply to Thread
Results 1 to 11 of 11

How to create a userform to return full data about an item?

  1. #1
    Registered User
    Join Date
    02-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    17

    Question How to create a userform to return full data about an item?

    Dear experts,

    Please I need a help in how to create a userform with a listbox or a combobox that when i choose any item from the list, it will give a table with the subcatgories of the selected items and all its information in the following way:

    The listbox for example will have the following items to pick:

    Cars
    Books
    Roads

    and if i select Cars it will give me the following table on a popup userform or even in excel table if the popup userform is difficult:

    Brand Color Horse Power Speed Model 4Wheel
    Mercedes Black 125 250 2012 No
    BMW Red 140 240 2011 No
    Infiniti White 160 220 2010 Yes

    And then if i choose different item like books it will hide the table above and show another similar table.

    Is this possible?

    Thank You in Advance
    AttalaEA

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

    Re: How to create a userform to return full data about an item?

    Depends how the data is set up. Attach an example workbook
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363

    Re: How to create a userform to return full data about an item?

    It is always a good idea to attached small sample what you want in a spreasheet.
    Anyways here is a example
    Attached Files Attached Files
    Denis

    Please always attach the sample workbook without sensitive information when asking for help

    To add a module
    Press Alt + F11 (this is the Visual Basic Environment)
    Insert Menu, select Module
    Past code there
    Close Visual Basic Environment (X)

  4. #4
    Registered User
    Join Date
    02-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: How to create a userform to return full data about an item?

    Quote Originally Posted by jetted View Post
    It is always a good idea to attached small sample what you want in a spreasheet.
    Anyways here is a example
    Thank You so much. this is very close to what i need except that i need under each main category of the combobox it gives me all subcategories with its information i.e. when i pick up cars from the combobox the table should include the all brands and them data at once and when i change the main category in the combobox to Books for instance it will give me another table with for example each book and its data like author publish date in a similar manner to the cars details table and so on for each main category because i have many main categories.

    Thank you for your help and sorry for not attaching a workbook.
    Attached Images Attached Images
    Last edited by AttalaEA; 02-22-2012 at 02:11 AM.

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

    Re: How to create a userform to return full data about an item?

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.

    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file.

    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  6. #6
    Registered User
    Join Date
    02-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: How to create a userform to return full data about an item?

    Dear RoyUK,

    Pardon me in not uploading a workbook because i am not concered about the data itself now as how to do it and since I dont know how to initate the userform that is why I thought it will be useless to upload a workbook with a table of data that doesn't reflect anything from what I want because it is all depending on the programming and userform.

    Regards and thank you for your help.
    Last edited by AttalaEA; 02-22-2012 at 03:09 AM.

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

    Re: How to create a userform to return full data about an item?

    Well I'm not going to spend time trying a solution when I can't see what your data layout is & what the expwected resulkts are. Good luck

  8. #8
    Registered User
    Join Date
    02-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: How to create a userform to return full data about an item?

    Quote Originally Posted by royUK View Post
    Well I'm not going to spend time trying a solution when I can't see what your data layout is & what the expwected resulkts are. Good luck
    Thank You.

  9. #9
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363

    Re: How to create a userform to return full data about an item?

    Hi

    I agree with Roy, because it is difficult to test something without a working copy. Since you insisted here is a new spreadsheet
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: How to create a userform to return full data about an item?

    Quote Originally Posted by jetted View Post
    Hi

    I agree with Roy, because it is difficult to test something without a working copy. Since you insisted here is a new spreadsheet
    Thank You so much this exactly what I need. I do appreciate your kind help many many thanks.

    Best Regards

  11. #11
    Forum Contributor
    Join Date
    04-03-2011
    Location
    India
    MS-Off Ver
    Excel 2015
    Posts
    122

    Re: How to create a userform to return full data about an item?

    Hi Jetted,

    in your attached book1.xls shows a selecting list " car" . Instead of selecting a list , can we write "car" in 1st box and result fires in below 2nd box

+ 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