+ Reply to Thread
Results 1 to 7 of 7

Check Box Cell Link

  1. #1
    Registered User
    Join Date
    02-03-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Check Box Cell Link

    Do all the cell links for the check boxes need to be done manually or can excel do the links automatically.

    Just like when you copy and paste a cell with a formula to another cell, it copies the formula but updates the cells its referencing to.

    I want to do the same thing with the check box. but when I paste the check box, it keeps the original reference cell link. I already made sure what the cell link is not absolute.

    Or am I going about this wrong.

    Thanks for your help.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Check Box Cell Link

    Here's a VBA solution.
    The below process sequentially sets the cell link for each checkbox to the cell under the upper left corner of the checkbox.

    • Select your workbook
    • ALT + F11...to open the vba editor
    • Insert.Module...to create a general module in that workbook
    • Copy the below vba code and paste it into that module
    Please Login or Register  to view this content.
    Replace Sheet1 with the name of the worksheet containing your checkboxes
    To run the code:
    • ALT+F8
    • Select SetCbxLinks
    • Click: Run

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    02-03-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Check Box Cell Link

    Let me try it.

  4. #4
    Registered User
    Join Date
    02-03-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Check Box Cell Link

    I like it... Thanks. I'm a beginner with VBA Programming. How do I control what cells should be linked? My form I have the check box in Column Z, I need to link the cell that is 4 Cell to the right (Column AC). How would I go about this?

    And once again what a great help. I have about 900 Check boxes I would of had to do manually. Thanks
    Last edited by 1vision; 05-14-2014 at 08:27 PM. Reason: Typo

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Check Box Cell Link

    Here you go:
    Please Login or Register  to view this content.
    If the checkboxes are in Col_A, that code puts the links in Col_E.

    Does that help?

  6. #6
    Registered User
    Join Date
    02-03-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Check Box Cell Link

    Perfect this helped tremendously. Thanks for the help.

  7. #7
    Registered User
    Join Date
    07-24-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1

    Re: Check Box Cell Link

    I know this is an old thread, but I made the following tweak to the code so that it will always work dynamically with the active workbook and worksheet.
    Please Login or Register  to view this content.
    I am still floored that I had to resort to this for basic functionality that should be included in Excel!

+ 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. Cell Link assignment for check boxes
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-31-2013, 11:17 AM
  2. Replies: 2
    Last Post: 04-29-2013, 07:25 PM
  3. Changing Cell Link for Check Box Form Control
    By fervorking in forum Excel General
    Replies: 2
    Last Post: 09-02-2011, 03:12 PM
  4. Check box: Move with cells AND Link to cell
    By mteschl in forum Excel General
    Replies: 0
    Last Post: 09-05-2007, 07:44 PM
  5. Replies: 4
    Last Post: 05-09-2007, 07:30 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