+ Reply to Thread
Results 1 to 5 of 5

Linking checkbox to cell based on combo box choice

  1. #1
    Registered User
    Join Date
    07-20-2017
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    20

    Linking checkbox to cell based on combo box choice

    Good morning,
    I have been working on several projects and one keeps me up at night trying to figure out what type of script I need to write. I have a list of names that will be changing based on other things going on. I have a userform with both a combo box and a check box. combo box already updates with anyone that active. What I am trying to do is based on the name I select from the combo box, I want the check box to link to the cell to the right . the check box in this case is related to being qualified for a job.
    for instance, if I have 2 people (Kevin and Test) and kevin is qualified, derrick is not. I would like when I select kevin under the combo box that the check box will be checked (because the cell to the right of kevin is true), but I could unselect the checkbox to change the cell's value.

    The best I can think of is doing a vlookup like I have done in other areas and adding the linking to the cell option after the lookup. I'm not sure how to write it. Any help would be appreciated.

    If I did it right, there should be an attachment to show what I have so far and the big red button is what I am working on.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Linking checkbox to cell based on combo box choice

    A checkbox in a userform does not have a LinkedCell property so you have to code it. In this code for your QUALS form, when the checkbox is clicked, the corresponding cell in the worksheet is set to TRUE or FALSE based on the value of the checkbox. Implemented in attached file.

    Please Login or Register  to view this content.
    Also, note that I added Option Explicit. I strongly recommend to everyone that they declare variables. Doing so prevents a lot of bugs and runtime errors.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-20-2017
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    20

    Re: Linking checkbox to cell based on combo box choice

    awesome! I haven't worked with "option explicit" before so that's why I wasn't even thinking that way. now I see it is updating just fine, just one issue. If test dummy is qualified "true" on something and you re-open that userform, it shows it as blank still. I want to be able to visually see on the userform if they are qualified or not. aka, If test dummy lost his qualification I want to be able to make it go false without clicking the checkbox twice. It should already show the checkbox checked and I can just uncheck it.

    Is this possible? maybe a code for the combobox_change to update the value of the checkboxes?

    Thank you again!

  4. #4
    Registered User
    Join Date
    07-20-2017
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    20

    Re: Linking checkbox to cell based on combo box choice

    I figured it out.

    Please Login or Register  to view this content.
    Thank you so much!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Linking checkbox to cell based on combo box choice

    Nice job of figuring it out!

+ 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. Linking checkbox to cell based on combo box choice
    By kevo1588 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2017, 03:34 PM
  2. Autofill Colums based on combo box choice
    By Coleman34 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2014, 01:21 PM
  3. [SOLVED] Want to call Macro when cell changes as a result of Combo Box Choice
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2012, 09:26 PM
  4. Replies: 2
    Last Post: 07-10-2012, 04:37 PM
  5. Linking to Outlook Contact Information based on Combobox Choice
    By Nick_P in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2012, 02:28 PM
  6. Replies: 5
    Last Post: 01-05-2011, 11:37 PM
  7. [SOLVED] Exclusive choice checkbox
    By Tony in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-12-2006, 06:45 AM

Tags for this Thread

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