+ Reply to Thread
Results 1 to 4 of 4

Set Checkboxes to Checked/Unchecked in Range based on Values in Other Range

  1. #1
    Registered User
    Join Date
    09-01-2010
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Question Set Checkboxes to Checked/Unchecked in Range based on Values in Other Range

    Hi there. So I've come upon an issue I'm hoping someone here can help me with. I have three columns of checkboxes in ranges: A2:A48, B2:B48, and C2:C48. I also have three columns of TRUE/FALSE data in ranges F2:F48, G2:G48, and H2:H48. I want to write VBA code that allows me to set the values of the checkboxes in A2:A48 depending on the TRUE/FALSE values in F2:F48, B2:B48 based on values in G2:G48, and C2:C48 based on H2:H48, respectively; A2 should be checked if F2 = TRUE, and so on. So far, nothing I've tried gives me the full effect of looking at one value and setting the box in another.

    Also, I have created and linked the boxes to their respective cells using VBA already, so no need to refer to them by checkbox name.

    As always, thanks in advance!

    ~lp

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

    Re: [VBA REQ] - Set Checkboxes to Checked/Unchecked in Range based on Values in Other Rang

    Hello lowprofile,

    Please post a copy of your workbook. This will make coding a solution faster.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-01-2010
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Set Checkboxes to Checked/Unchecked in Range based on Values in Other Range

    Sure. Here it is.
    Attached Files Attached Files

  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,259

    Re: Set Checkboxes to Checked/Unchecked in Range based on Values in Other Range

    Hello lowprofile,

    I almost missed your reply. I didn't see it until I reviewed my emails this morning. I used the macro below to assign the cells in columns "F:H" to the check boxes in column "A:C" of the same row. Now, when you change the value in columns "F:H" with either the words False or True,, the corresponding check box will change. Clicking the Check Box will also change the cells in "F:H" to the current check box state.

    I did not save the macro in order to keep the workbook macro free.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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