+ Reply to Thread
Results 1 to 2 of 2

For Multiple Checkbox assign Cells

  1. #1
    Registered User
    Join Date
    06-12-2016
    Location
    Sarajevo
    MS-Off Ver
    2013
    Posts
    11

    For Multiple Checkbox assign Cells

    I have fund this macro:

    Sub LinkCheckBoxes()
    Dim chk As CheckBox
    Dim lCol As Long
    lCol = 2 'number of columns to the right for link

    For Each chk In ActiveSheet.CheckBoxes
    With chk
    .LinkedCell = _
    .TopLeftCell.Offset(0, lCol).Address
    End With
    Next chk

    End Sub
    And it works perfect when I have only checkbox in one column but when I have three or more then it won't work.

    Has any of you come across Macro that can for every checkbox assign cell (true/false) even if you have three columns of checkbox.

    Thank you,

    Sab

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: For Multiple Checkbox assign Cells

    Do you have hidden columns where True should show? I ask this because I just created 11 checkboxes over 3 columns in a blank sheet, ran your code and they all worked.
    Last edited by gmr4evr1; 09-04-2016 at 04:50 PM.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

+ 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. Assign variables to multiple cells quickly
    By gandhiad in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-17-2015, 05:01 PM
  2. Assign a duplicated cell to multiple other cells
    By Nikolas1988 in forum Excel General
    Replies: 3
    Last Post: 06-12-2014, 05:49 AM
  3. Assign value to a cell, depending upon checkbox status
    By jonnycarson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-04-2013, 06:41 AM
  4. assign macros to activeX Control checkbox
    By daniva92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2013, 10:10 AM
  5. Assign multiple macro to one checkbox!
    By drunken_master in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-13-2008, 12:13 PM
  6. assign macro to checkbox placed on worksheet
    By vandanavai in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2007, 03:09 PM
  7. Assign 1 Macro to Run Multiple Checkbox Controls
    By Jay59 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-17-2007, 12:37 AM

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