+ Reply to Thread
Results 1 to 4 of 4

Auto Disappear of all checkboxes in 2 form except selected value from combobox in 1 form

Hybrid View

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    33

    Auto Disappear of all checkboxes in 2 form except selected value from combobox in 1 form

    Dear All,

    I have two user forms in my excel sheet. In one form user needs to select name from combo box and ID of user auto populates in text box. When users press OK button in this form, it opens another form which has around 40 check boxes. Check box get auto ticked based on selection of ID in previous form. Based on selection of check boxes in this form, respective sheet get activated.

    I don't want user to see all checkboxes. User should be able to see checkbox of his own ID. Rest of checkboxes should disappear.

    e.g. If user has selected ID "001" from one form and in the second form ,"001" should appear and other check boxes should be disappeared as well.

    Please find attached demo sheet.
    Attached Files Attached Files
    Last edited by excel_126; 11-10-2014 at 10:10 AM.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Auto Disappear of all checkboxes in 2 form except selected value from combobox in 1 fo

    Quote Originally Posted by excel_126 View Post
    ... it opens another form which has around 40 check boxes. Check box get auto ticked based on selection of ID in previous form. ... I don't want user to see all checkboxes...
    Then why have one? It seems you're going to a lot of trouble to have a checkbox that is only a refection of one selection in the combobox.

    Checkboxes are to give a user several options. If there is only one option, then why have one?

    Wouldn't it be better to give feedback in a label that shows the user which sheet the info is coming from?
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    07-10-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    33

    Re: Auto Disappear of all checkboxes in 2 form except selected value from combobox in 1 fo

    Dear David,

    Many thanks for your reply.

    I don't want user to select any other person's ID on second form. That is the reason I want that rest of checkboxes should disappear from list. Greying out os also fine with me. Please help.

    KR

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Auto Disappear of all checkboxes in 2 form except selected value from combobox in 1 fo

    To disable all but the selected checkbox, in the CheckBox CommandButton1 click event
        For Each ctl In Completetask.Controls
            If TypeOf ctl Is MSForms.CheckBox Then
                If ctl.Caption = Me.ComboBox2.Value Then
                    ctl.Value = True
                    'Exit For
                Else
                    ctl.Enabled = False
                End If

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Auto selection of Check box in one form based on value of combobox from other form.
    By excel_126 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-28-2014, 03:09 AM
  2. Macro to filter data to search terms selected from ComboBox (Form Control)
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2013, 05:08 PM
  3. Calling a user form initialize sub when entering the form to populate combobox...
    By regupnorth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2012, 07:24 AM
  4. [SOLVED] Making a User form text entry box show when a checkbox is selected
    By delaneybob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2012, 07:24 PM
  5. Transfer User form data to a worksheet w.r.t. combobox item on the form
    By nm766 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2011, 12:43 PM

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