Consulting

Results 1 to 5 of 5

Thread: Option Enabled Search

  1. #1

    Option Enabled Search

    Hello,

    I am a very new and basic user of VBA so thank you ahead of time for your patience. I would like be able to use option boxes to dictate what will be searched and what will populate in my cover sheet. For example, if I have "Type" pressed and put "200" in the text box and hit search all of the results with type 200 will show up on the cover page. Right now I have the VBA code that pulls up the "Part Number" but that is not linked to the option buttons, those are just for show. As I am brand new to this forum please let me know if you will be needing additional information. Any and all information would be beneficial.

    Please see the attachment for clarification.

    Thanks,
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    In the attached, Coversheet cells I1 contain a number, being which option button is selected. It's the linked cell to your group of option buttons. This number is then used to decide which column to search.
    You may also be interested in Coversheet (2) which uses a different approach. Fill in any number of green cells and click Search. Return all results by clearing the green cells (button provided) and clicking Search.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Thank you. This has been extremely helpful. Just one question, it may be elementary, but how did you assign the values to the option buttons?

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    Quote Originally Posted by sam05hart View Post
    Thank you. This has been extremely helpful. Just one question, it may be elementary, but how did you assign the values to the option buttons?
    I didn't; that's how they come.

    2018-08-06_164644.jpg

    2018-08-06_164739.jpg

    Select various option buttons to see which value each carries.
    You only need to link one of the option buttons to a cell, all the other option buttons in the same group automatically also link to that cell.
    If you want more than one group then you have to include those you want to group inside a Frame (oops, Group Box) (but you don't need that here).
    Last edited by p45cal; 08-06-2018 at 09:36 AM.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    Ahh, I see. Thank you. You have been a huge help.

Posting Permissions

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