+ Reply to Thread
Results 1 to 11 of 11

Creating a list of buttons to make selection

Hybrid View

  1. #1
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Creating a list of buttons to make selection

    I haven't used buttons much.
    I would like to create a list of projects in column A.
    Then the user would select one of the projects. This can be done by clicking on the corresponding cell in column B. So I would lkie to see buttons in column B for this. OR if someone can suggest another way, e.g. highlighting the project name in column A or putting an x in corresponding cell in column B.
    I can make this last scenerio work, but I don't know how to assure that only one project can be selected at a time.
    In other words if I have selected project in ROW 12 and then I want to see project in ROW 17, I should be able to select 17. And 12 should be deselected automatically.
    Hope its clear enough to understand what I want.
    Thanks,
    modytrane

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Select Project from a list

    Let me give an example.

    Column A will have a list of projects [up to 150].
    I would like the user to be able to select a project somehow.
    I have other sheets which will pick up the selected project name and display some summary information for that project in sheets 2 and 3.
    The use should be able to scroll down to another project and select that.
    But when he selects a new project, the previous one should be deselected.
    Thanks,
    modytrane

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Buttona in Group Box

    I figured out that I can put a number of Options Buttons in a Group Box and it allows you to select only one at a time. That's what I was looking for. Now How do I read the value of the button that is selected or use that in a formula. I will have a column full of buttons, all in a group box. Next to each button, there would be a project name. I simply want to know which button has been selected and copy the name of the corresponding project name to another cell. Then I will take off from there.
    Thanks,
    modytrane

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello modytrane,

    If you want to know the name of the option button, and it is from the Forms toolbar, you can use the following code in a macro to get the name of the option button. With the option button's name, you can retrieve the caption. You would need to attach this macro to the button.
    Sub GetProjectName()
    
      Dim Btn As String
      Dim OptBtn As Object
    
        Btn = Application.Caller
        Set OptBtn = ActiveSheet.OptionButtons(Btn)
    
        'Save the name in a cell
    
    End Sub
    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 06-03-2008 at 02:03 PM.

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Box fullof Buttons

    I am attaching an example of what I am looking for.

    In the attached sample file I need help witha few items.

    How do I get rid of the descriptor "Group Box 1"?

    I also need to have over 75 buttons in the box. Is there an easier way to add them and label each one? [the label can be a simple as "1,2,3,4...."].
    Next to each button there would be a list of project in the next column.
    When a button is clicked [or selected], the project name next to it would be copied to cell I5.

    Or if someone has a different idea to achieve same result, I would like to look in to it.


    Thanks for any help,
    modytrane
    Attached Files Attached Files

  6. #6
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Hi modytrane,

    I've created a sample workbook (somewhat crude) but it's all I can do and I want to help.

    I created a DropDown from the Forms Toobar and filled it with values from O1:O4 of Sheet 1.

    Then added the Sub DropDown1_OnChange macro that populated cell I5 with the value from that DropDown.

    Perhaps this could get you going.

    I couldn't figure out how to reset the DropDown afterwards though.

    Workbook attached
    Attached Files Attached Files
    Hope this helps

    Seamus

+ 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